Warning: Rank deficient, rank

12 ビュー (過去 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 Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by