How to calculate Matrix within loops? store values for n numbers fo 3*3 and 6*6 matrix
1 view (last 30 days)
Show older comments
T(i)=[m(i)*m(i) n(i)*n(i) 2*m(i)*n(i); n(i)*n(i) m(i)*m(i) -2*m(i)*n(i); -m(i)*n(i) m(i)*n(i) (m(i)*m(i))-(n(i)*n)];
I have to calculate T for n1(n Nos.)
0 Comments
Accepted Answer
Walter Roberson
on 4 Jun 2015
Replace the assignment with
T(:,:,i) = [m(i)*m(i) n(i)*n(i) 2*m(i)*n(i); n(i)*n(i) m(i)*m(i) -2*m(i)*n(i); -m(i)*n(i) m(i)*n(i) (m(i)*m(i))-(n(i)*n)];
The only thing that changed is the place being assigned to.
0 Comments
More Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!