how to rectify the index must be a positive integer or logical error?

조회 수: 2 (최근 30일)
PRIYANGA
PRIYANGA 2012년 12월 13일
I have to rectify the Error using Horzcat command.
domr=[6 7];
domg=[3 4];
domb=[2 ];
dom=horz(domr,domg,domb);
Then Decoding stage i got Error in ??? Attempted to access dompol1(-3,:); index must be a positive integer or logical.
Error in ==> DEIMGC at 12 D1=dompol1(fraco(4),:);
Error occurring in the following function arguemnts.....
[cimg1r]=deimgc(vqcode7r,dompool3r,gsize,scale);
[cimg1g]=deimgc(vqcode7g,dompool3g,gsize,scale);
[cimg1b]=deimgc(vqcode7b,dompool3b,gsize,scale);
how can I pass the negative values in this program or how to rectify the Negative Error?

답변 (1개)

Jan
Jan 2012년 12월 13일
편집: Jan 2012년 12월 13일
You are asking for horzcat, but you call horz. The latter could be FEX: horz, but this is not clear.
Perhaps you want this:
domr = [6 7];
domg = [3 4];
domb = [2 ];
dom = horzcat(domr, domg, domb);
% or equivalent:
dom = [domr, domg, domb];
  댓글 수: 1
PRIYANGA
PRIYANGA 2012년 12월 13일
Ok Sir I accept that concatenation.
Now I want to Error rectification of Attempted to access dompol1(-3,:); index must be a positive integer or logical.
Error in ==> DEIMGC at 12 D1=dompol1(fraco(4),:);
Error occurring in the following function arguemnts.....
[cimg1r]=deimgc(vqcode7r,dompool3r,gsize,scale);
[cimg1g]=deimgc(vqcode7g,dompool3g,gsize,scale);
[cimg1b]=deimgc(vqcode7b,dompool3b,gsize,scale);
how can I pass the negative values in this program or how to rectify the Negative Error? or how can i convert the negative value to positive value?

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

카테고리

Help CenterFile Exchange에서 Specialized Power Systems에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by