How can I handle the "Index exceeds matrix dimensions error" by programming?
이전 댓글 표시
I have stored data in a structured variable, like this:
data(1).pp(1,:)=[3 4];
data(3).pp(1,:)=[3 4];
but the index 2 is free from data. when I am going to access data(1).pp or data(3).pp , then it is ok. But when I am going to access data(2).pp, it gives the error. Is there any function to handle the index exceeds matrix dimension error in run time by programming like a empty matrix (isempty())?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!