|
"Roberto Garcia" <r.garcia@student.fontys.nl> wrote in message <gjvtn7$gfc$1@fred.mathworks.com>...
> Dear all,
>
> 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.
> Here the values from 0-500 correspond to the values of all the first rows
> The values from 501-1001 are the values of the second rows.
> And finally the values from 1001-1501 are the values of the third rows
> If I want to multiply for instance a 1x3 matrix with all these matrices independently, how can I do it?
> I tred by myself but my matlab skils are not too developed yet.
> Thanks,
> Roberto
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 k-th such 3 x 3 would be:
M([0 500 1000]+k,:) or M(500*(0:2)+k,:)
for k = 1 to k = 500, and to do matrix multiplication of p by this would be:
p*M([0 500 1000]+k,:)
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 for-loop that advances k from 1 to 500.
Roger Stafford
|