- #1
Physics_wiz
- 228
- 0
I have about 5000 matrices which are all in excel. I need to put them all in Matlab so I can use them in programs. Every one of the 5000 matrices will be in its own excel sheet and they will all be saved in a folder. I don't mind reading them one by one in Matlab, but the thing I am having trouble with is manipulating the names of the matrices. For example, I want the first matrix to be called A1, the second to be called A2, third A3, etc... After all those are in Matlab, I want to do operations such as Ax(:,2)+A(x+1)(:,5) inside loops.
My main question is, can I somehow make a vector of just the names (i.e. names = [A1 A2 A3...A5000] and then use those in loops? Say I want to add every matrix to the one 5 steps after it like, B1 = A1+A6, B2 = A2+A7, etc... how can I use matrix names inside a loop?
My main question is, can I somehow make a vector of just the names (i.e. names = [A1 A2 A3...A5000] and then use those in loops? Say I want to add every matrix to the one 5 steps after it like, B1 = A1+A6, B2 = A2+A7, etc... how can I use matrix names inside a loop?
Last edited: