MATLAB: Looking through a Matlab Class

classloop

Hi!
I would like to execute some actions on every object of my class, say "Island".
Is there a command in Matlab allowing this? like
for island = Island
% actions to do
end
I hope I've made myself understood 🙂
Thank you!
Martin

Best Answer

if you have an array, obj, of Island objects, you would just do things like
for i=1:length(obj)
obj(i).prop=...
end