Warning: Rank deficient, rank

조회 수: 10 (최근 30일)
Eng. Fredius Magige
Eng. Fredius Magige 2016년 11월 1일
댓글: Walter Roberson 2016년 11월 2일
I am calling some element/indexing from matrix to allocate some element in another matrix (not having the same row and column). am ending with
Warning: Rank deficient, rank = 0, tol = 0.0000e+000. ??? Error using ==> mldivide
Matrix dimensions must agree.
Please assist on that warning, the code mentioned below
for Xx=1: JmRow % allocation of all flowing in pipeline
if(Graptable(Xx,14) ~=0&&Graptable(Xx,5)==0&&Xx~= JmRow)
xycon(Graptable(Xx,2)-0,4)=Graptable(Xx,14)
elseif(Graptable(Xx,14) ~=0&&Graptable(Xx,5) ~= 0&&Xx~= JmRow)
xycon(Graptable(Xx,2)-0,4)=Graptable(Xx,14)
xycon(Graptable(end,2)+sum(Graptable(1:Xx-1,3))+1-0,4)=Graptable(Xx,15)
elseif(Graptable(Xx,14) ==0&&Graptable(Xx,5) ~=0&&Xx~= JmRow)
xycon(Graptable(end,2)+sum(Graptable(1:Xx-1,3))+1-0,4)=Graptable(Xx,15)
else
xycon(Graptable(end,2)-0,4)=sum(Graptable(Xx,14:15))
end
end
  댓글 수: 2
Eng. Fredius Magige
Eng. Fredius Magige 2016년 11월 2일
Hi Walter thanks, the code is very huge more than 50 pages. when ignore this code and manually add all relevant input in xycon matrix, i got correct answer without any warning, thus why i suspect this code
Walter Roberson
Walter Roberson 2016년 11월 2일
Well you could save() the relevant variables into a .mat and construct an example that load()'s them and then has the code that leads to the failure.

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

답변 (1개)

Walter Roberson
Walter Roberson 2016년 11월 1일
The code you posted is not able to produce the warning or the error message you indicate. The error message you post is generated by the \ operator, which your posted code does not use. (Not unless possibly Graptable is a function instead of the array it appears to be.)
Please post your complete code and a complete copy of the error message, everything in red.

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by