|
Hi,
I am facing a trouble while concatenating in a loop. Here is a problem:
I have matrix B1, B2, B3, B4.....,B20 (each matrix has different number of rows but have same number of columns i.e. 3) and on each matrix I perform a certain operation. At the end of the operation I write the data to a txt file and clear everything else.
To process everything at one go, I wish to have a loop so that the code reads each matrix performs the operation, and moves to the next matrix. But I cant figure out the way to code. I have the following in my mind but do not know how to move forward:
for j=1:1:20
m= strcat('B', j);
.... Perform mathematical operation on matrix m
....
end
After concatenation of the B with j, m=Bj (j has a value like 1 or 2..or...), but m is not the same as Bj matrix. Can someone please help me figure out the correct solution to this problem. I very much appreciate your assistance.
Thanks so much.
|