Hello everyone,
Sorry if this question was already asked, but I couldnt find something that worked for me. I have the following Matlab struct
mystruct point1 : struct point2 : struct . . . . pointN : struct
Basically a structure containing point coordinates,
what I wish to do is basically fetch the data of the structure in a loop. Unfortunately I wasnt able to achieve this. What I created was
for i = 1:N
varName = strcat('mystruct.point',int2str(i));
%fetch data using the varname
end
Basically this is a snippet out of a bigger codeflow which I have simplified for the sake of my question.
Regards,
Sanjay
Best Answer