http://www.mathworks.com/matlabcentral/newsreader/view_thread/241948
MATLAB Central Newsreader  Matrix components
Feed for thread: Matrix components
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Tue, 06 Jan 2009 15:35:03 +0000
Matrix components
http://www.mathworks.com/matlabcentral/newsreader/view_thread/241948#620092
Roberto Garcia
Dear all,<br>
<br>
I'm working with matrices. Here is my question when I create a 3x3 matrix of for instance 500 measurements. Then I get a matrix of 1500 x 3. <br>
Here the values from 0500 correspond to the values of all the first rows<br>
The values from 5011001 are the values of the second rows.<br>
And finally the values from 10011501 are the values of the third rows<br>
If I want to multiply for instance a 1x3 matrix with all these matrices independently, how can I do it?<br>
I tred by myself but my matlab skils are not too developed yet.<br>
Thanks,<br>
Roberto

Thu, 08 Jan 2009 03:37:01 +0000
Re: Matrix components
http://www.mathworks.com/matlabcentral/newsreader/view_thread/241948#620401
Roger Stafford
"Roberto Garcia" <r.garcia@student.fontys.nl> wrote in message <gjvtn7$gfc$1@fred.mathworks.com>...<br>
> Dear all,<br>
> <br>
> I'm working with matrices. Here is my question when I create a 3x3 matrix of for instance 500 measurements. Then I get a matrix of 1500 x 3. <br>
> Here the values from 0500 correspond to the values of all the first rows<br>
> The values from 5011001 are the values of the second rows.<br>
> And finally the values from 10011501 are the values of the third rows<br>
> If I want to multiply for instance a 1x3 matrix with all these matrices independently, how can I do it?<br>
> I tred by myself but my matlab skils are not too developed yet.<br>
> Thanks,<br>
> Roberto<br>
<br>
Call your 1500 x 3 matrix M, and the 1 x 3 matrix p. Based on your (slightly flawed) description of the arrangement of 3 x 3 matrices within M, the kth such 3 x 3 would be:<br>
<br>
M([0 500 1000]+k,:) or M(500*(0:2)+k,:)<br>
<br>
for k = 1 to k = 500, and to do matrix multiplication of p by this would be:<br>
<br>
p*M([0 500 1000]+k,:)<br>
<br>
I can't tell what you intend to do with the 500 resulting 1 x 3 vectors. Perhaps you intend to use them in some manner in a forloop that advances k from 1 to 500.<br>
<br>
Roger Stafford