so we have this matrix a=[1;2;3]
and we want to multiply it by itself a*a
,
However Matlab doesn't do this multiplicaiton, and suggests using a.^2
, but this only multiplies each member by itself ( 1;4;9 )
...
so how to multiply in Matlab a*a (a^2)
??
Greeed
You can't multiply it by itself, because it's not square.
You can multiply it by its transpose, though:
a * a'
or:
a' * a
Which one you use depends on what you want. But it sounds like you don't know what you want (otherwise there would be no question...)
you can't multiply this two matrices, see why here:
In your case it is 3X1 matrix multiply by 3X1 matrix.
http://en.wikipedia.org/wiki/Matrix_multiplication#Illustration
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.