Hi Everyone
I have stored a few values in a structure. I am using the getfield()
function and after getting value of a single element which satisfies a
condition storing it in a variable varx
The situation is like this:
for i=1:4
for n=1:4
varx(i,:) = getfield(J,{n,1}, 'val')
end
end
The 'val' field of the structure has values in the form
j1,j2,......j15. J is the name of the structure.
I have no problem if the 'val' field has values upto 'j9'.
But when the selected value is in the range j10,.....j15
i get the following error:
??? Subscripted assignment dimension mismatch.
Any help in this regard is highly appreciated.
Regards