Good evening,
I have encountered a problem regarding data storing from FOR loops. I'm using the following code:
[~,m]=size(obs);for j=1:m;[~,n]=size(obs(j).data);for i=1:n A=extr(eph,obs(j).data(1,i)); B(i).data=A;endend% obs is a 1x2880 structure
% eph is a 36x212 matrix
% extr(eph,obs.data) is a function
% I want to store all values of B(i) in a new structure (1x2880)
The problem is that my code remembers the previous stored data and adds the new data in the current structure..How I can manage this situation?
Best Answer