sometimes I get a warning : rank deficient

2 次查看(过去 30 天)
sometimes I get a Warning: Rank deficient, rank = 0, tol = 0.000000e+00 and it points to an equation in a loop :
a = sqrt(abs(x/x-d))); where x and d are scalars
my results seem plausible, but should I be concerned about this warning ?
  1 个评论
William Campbell
William Campbell 2020-3-2
Thanks for your fast response - it looks like I had updated my x variable further into my script and created a conflict. All sorted now. Thanks again.

请先登录,再进行评论。

回答(1 个)

Matt J
Matt J 2020-3-2
编辑:Matt J 2020-3-2
should I be concerned about this warning
If the line you've shown is what caused the warning, then it's likely x and d are not both scalars as you intended. You might need to be concerned about that.
Incidentally, this line looks like it should be,
a = sqrt( abs( x./(x-d) ) );

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by