The elements of a mxn matrix are the results of m*n matrices. how to do it?
1 view (last 30 days)
Show older comments
Hi. I have a situation where i have to generate a 6x6 matrix in which each element of the matrix is a result of 36 different matrices. i used the following code to generate the 6x6 matrix. matrix_11=[...]; matrix_12=[...]; . . . matrix_66=[...]; for i=1:6 for j=1:6 w(i,j)=matrix_??? end end My problem is how to call each of the matrix separately in w for every value of i and j. pls help cyberguys.
0 Comments
Accepted Answer
Andrei Bobrov
on 25 Apr 2013
w = cell(6);
for i1 = 1:6
for j1 = 1:6
w{i1,j1} = eval(sprintf('matrix_%d%d',i1,j1));
end
end
0 Comments
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices 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!