Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
this code shows error?
조회 수: 1 (최근 30일)
이전 댓글 표시
S=S(1:f-1,f+1:length(S))
,,,, error:?? Index exceeds matrix dimensions.
댓글 수: 0
답변 (2개)
Walter Roberson
2013년 2월 26일
Yes, that would occur if S is not two-dimensional and at least f-1 elements in the first dimension and length(S) elements in the second dimension.
Are you possibly trying to remove element #f from S? If so then
S(f) = [];
or
S = S([1:f-1, f+1:numel(S)]);
댓글 수: 0
Jan
2013년 2월 26일
Another guess:
Did you define "length" as a variable? Then "length(S)" might fail. Test this by:
dbstop if error
% start the code until Matlab stops at the problem. Then:
which length
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!