problem checking rank of a matrix
Mostrar comentarios más antiguos
Hello,
during an optimization of a function I simulate a matrix xx and a matrix yy. The dimensions are n times 3 for xx and n times 1 for yy. Subsequently I want to run the regression yy=beta*xx+e by using the backslash operator.
However in some cases I get the warning:
{Warning: Rank deficient, rank = 2, tol = 1.1852e-013.}
To avoid this I implemented an if-loop that forbids the computer to run the regression if rank(xx)<3. However this does not work. There are cases where Matlab runs the regression nevertheless and displays the warning.
Do you have any idea how to solve the problem?
4 comentarios
Walter Roberson
el 8 de Dic. de 2011
There is no such thing as an if loop.
the cyclist
el 8 de Dic. de 2011
It is difficult to diagnose code errors without seeing the code. Are you able to post your code?
Sean de Wolski
el 8 de Dic. de 2011
The day no if loop survived!
HansWurst
el 14 de Dic. de 2011
Respuestas (1)
HansWurst
el 12 de Dic. de 2011
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!