I load my .txt files from a directory, in which contain 4x4 matrices, directly in a variable (rotLM) with following code in octave:
for i= 1:5
file_rotLM= strcat('C:\Users\pc\Desktop\matrices\rotLM',int2str (i),'.txt');
rotLM= strcat('rotLM',int2str(i))
rotLM= load(file_rotLM);
end
What I want: the variable name "rotLM" should contain the concatenated string at the end. Like: "rotLM1, rotLM2...rotLM5" and each those variables should contain the corresponding matrix paramters. If I run above code I get only :
rotLM = rotLM1
rotLM = rotLM2
rotLM = rotLM3
rotLM = rotLM4
rotLM = rotLM5
And if I tip in command window: rotLM it gives me only the last read matrix, but if I enter e.g. rotLM1 I get error "'rotLM1' undefined near line 1 column 1"
What is my mistake here? Thank you!