Warning: Rank deficient, rank

8 次查看(过去 30 天)
Eng. Fredius Magige
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
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 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by