Warning: Rank deficient, rank

15 vues (au cours des 30 derniers jours)
Eng. Fredius Magige
Eng. Fredius Magige le 1 Nov 2016
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 commentaires
Eng. Fredius Magige
Eng. Fredius Magige le 2 Nov 2016
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 le 2 Nov 2016
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.

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 1 Nov 2016
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.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by