How to Rectify the "index must be a positive integer or logical" Error in my code?

조회 수: 1(최근 30일)
Hi....Everybody... How are you?
??? Attempted to access dompol1(-1,:); index must be a positive integer or logical.
Error in ==> DEIMGC at 12 D1=dompol1(fraco(4),:);
Error in ==> VQWTVARWTQT at 486 [cimg1g]=deimgc(vqcode7g,dompool3g,gsize,scale);
This is Error in my code? How to correct that Error in my code.
>>

채택된 답변

Matt J
Matt J 2012년 12월 14일
편집: Matt J 2012년 12월 14일
Stop using negative numbers to index an array, like -1 in the following
dompol1(-1,:)
It doesn't correspond to any array location.
  댓글 수: 2

댓글을 달려면 로그인하십시오.

추가 답변(1개)

Muruganandham Subramanian
Muruganandham Subramanian 2012년 12월 14일
편집: Muruganandham Subramanian 2012년 12월 14일
Use abs() command

Community Treasure Hunt

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

Start Hunting!

Translated by