HI
I have loaded a structure format, and in this format, I want to load the y values
What I want to do is to load these structures, not by typing all of them individually, but using for loop
For example,
freq=2048;DOF=3;Axis={'x','y','z'};CAxis={'X','Y','Z'};SUBA = zeros(freq*2+1,DOF,DOF);for i=1:DOF for j=1:DOF load(strcat('SUB_A5_A1_',string(Axis(i)),'_',string(Axis(j)))); var=strcat('FRF_A_5__',string(CAxis{i}),'_A_1__',string(CAxis{j})); SUBA(:,i,j)=var.y_values.values(1,:); endend
So for each loading structure, their name is like SUB_A5_A1_x_x or SUB_A5_A1_y_y etc…
For each structure, there is one more structure named like FRF_A_5__X_A_1__X or FRF_A_5__Y_A_1__Y etc… (Let's call them 'insidestructure')
I don't want to make all the lines for them, so I first thought using a variable 'var' for naming these 'insidestructure'. However, this didn't work. How can I treat this?
Thanks a lot
Best Answer