<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 27/09/2014 01:19, Santiago Chialvo a
écrit :<br>
</div>
<blockquote cite="mid:BLU177-W33C56DD3FDCBBD32D50D0FCBF0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi, first of all, sorry for my english, it's not
good enough. I'm using Scilab 5.5.0 Version, and I found a
problem that I don't understand how it works.
<div><br>
</div>
<div>First of all, when I do the operation</div>
<div><br>
</div>
<div>R = A/B; </div>
<div><br>
</div>
<div>With A = Scalar and B = Vector, the result that gives me is
a R vector that satisfy:</div>
<div><br>
</div>
<div>R*B = A;<br>
<br>
But, my question is, how does it works? I mean, we have <br>
<br>
R(1)*B(1) + R(2)*B(2) .... + R(N)*B(N) = A;</div>
<div><br>
</div>
<div>Where we know the value of the components of B, and the
value of A, but it's only 1 equation with N unknowns!</div>
<div><br>
</div>
<div>How does it works, to have the values of R? Thanks,</div>
</div>
</blockquote>
As the problem is underdetermined the equation as an infinity of
solutions as follow. I will describe the process with the equivalent
equation B'*R'=A that can be written suing standard notations as
X*A=B, where A is a column vector X the row vector of the unknowns<br>
A can be factored as the product Q*R where Q is an othonormal square
matrix and R a column vector whose all elements but the first one
are zeros<br>
So the equation X*A=B can be rewritten (X*Q)*R=B or Y*R=B, all Y of
the form [B/R(1),y2,....yn] are solutions, and consequently all X=
[B/R(1),y2,....yn]*Q' are solutions of the initial equation<br>
<br>
Example<br>
-->A=(1:5)';B=4.5;<br>
-->[Q,R]=qr(A);R<br>
-->Y=[B/R(1),rand(1,4)];<br>
-->Y*R-B<br>
ans =<br>
0. <br>
-->X=Y*Q'<br>
-->X*A-B<br>
ans = <br>
- 8.882D-16 <br>
<br>
The particular solution computed by B/A serach for y2...yn that
maximize the number of 0 in the solution X.<br>
<br>
Serge<br>
<blockquote cite="mid:BLU177-W33C56DD3FDCBBD32D50D0FCBF0@phx.gbl"
type="cite">
<div dir="ltr">
<div>Santiago. </div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dev@lists.scilab.org">dev@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/dev">http://lists.scilab.org/mailman/listinfo/dev</a>
</pre>
</blockquote>
<br>
</body>
</html>