after doing some coding I have run a loop and saved values in cell R
for r=1:En R{r} =E(Ec+Ea(r,:),:);end
I have saved a variable of cell in a matfile named
save('data_12x6','R')
where 'data_12x6' is fle name and 'R'is variable . now I want to call this variable in the below code
for r=1:numel(R) X=(R{r}*x).*y'; XX(r)=(sum(X))*0.01; end
I an trying this
R=load('data_12x6','R')for r=1:numel(R) X=(R{r}*x).*y'; XX(r)=(sum(X))*0.01; end
but it is giving an error that
Warning: Variable 'R' not found.R = struct with no fields.Cell contents reference from anon-cell array object.
how can I do this?
Best Answer