Looking through a Matlab Class
이전 댓글 표시
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
채택된 답변
추가 답변 (1개)
댓글 수: 4
Matt J
2013년 5월 28일
Ok, thank you. It seems that there is no other solution :).
Why would there need to be?
Is there a way, only using All_Islands, to find the name of the variables (Skye & Corse) and not only there values (1 % 2)?
No, but if you describe your motive, it may point to better approaches.
Martin
2013년 5월 28일
Daniel Shub
2013년 5월 28일
@Martin, what you are asking to do seems a little bit strange (both the getting all objects and the getting the variable names). I think they are two separate questions and should be asked as such (you are likely to get better answers). In order to get the best answers, you will likely need to provide some broader insight into what you are trying to accomplish since my guess is you are too focused on the problem right now. Finally, please use the question, comment, and answer fields appropriately as it makes it easier to follow what is going on.
Martin
2013년 5월 28일
카테고리
도움말 센터 및 File Exchange에서 Function Creation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!