Hi
for a square matrix b the term a/b is equivalent (mathematically, not
numerically!) to a * inv(b).
Since b can not be inverted (vector, no matrix), one possibility to
generalize is e.g. the pseudoinverse:
pinv(b) = [0.0519;0.0649; 0.0779] as one possible "inverse",
since b*pinv(b) = 1.0. Of course there are many other choices, since we have
an underdetermined
system (b1*c1+b2*c2+b3*c3=1.0 has lots of choices for vector c!).
a*pinv(b) = 0.4156, so the same as you get with a/b.
Titus
"rauf butt" <engraufbutt@yahoo.com> schrieb im Newsbeitrag
news:ef097af.1@webx.raydaftYaTP...
> Ben Michell wrote:
>>
>>
>> rauf butt wrote:
>>>
>>>
>>> i have the following problem with vector division in matlab
>>> a=[1 2 3];
>>> b=[4 5 6];
>>> a/b
>>> matlab gives
>>> ans=
>>> 0.4156
>>> how does matlab calculates this ?
>>> if a and b are vectors
>>
>> Using the / operator implicitly performs a matrix division. Using
>> your example typing a./b gives:
>>
>> ans =
>>
>> 0.2500 0.4000 0.5000
>>
>> Which is what I suspect you were after.
>>
>> Ben Michell
>> Dunlop Motorsport
>
> i am rephrasing the query....
> i have defined two vectors in matlab
> when i divide these two, matlab provides an unusual answer
> that is
> a=[1 2 3];
> b=[4 5 6];
> c=a/b
> the answer is 0.4156
> how matlab calculated this answer?
> i am actually trying to divide two vectors not two matrices.
> note that i am not trying a./b which is array division
> but i am trying to divide two vectors using matrix division
