필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

What this indexing error all about in my matlab program. please help.

조회 수: 1 (최근 30일)
Virajan Verma
Virajan Verma 2018년 10월 25일
마감: MATLAB Answer Bot 2021년 8월 20일
%%Transpose of N_matrix
for i=1:26
for j=1:8
NT_matrix(i,j)=(N_matrix((i-1),j));(ERROR HERE)
end
end
Attempted to access N_matrix(0,1); index must be a positive integer or logical.
Error in practisee2 (line 367) NT_matrix(i,j)=(N_matrix((i-1),j))

답변 (1개)

Kevin Chng
Kevin Chng 2018년 10월 25일
indexing must be positive integer, don't allow zero or floating.
When i =1, then i-1 =0, then
N_matrix((0),j)
it cause the error.

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by