Rank deficient error, how to avoid it

28 visualizaciones (últimos 30 días)
Daniel Mbadjoun
Daniel Mbadjoun el 20 de Nov. de 2019
Editada: Adam Danz el 20 de Nov. de 2019
QTU = QTU(:), HB=HB(:), P=P(:) ;
HBinv=1./HB;
nqtu = length(QTU) ;
U = ones(nqtu, 1) ;
M = [U P HBinv P.^2 P.*HBinv HBinv.^2]
K = M\QTU
QTU_modele = M*K ;
residus = QTU-QTU_modele;
variance_d_origine = var(QTU) ;
variance_expliquee = var(QTU_modele) ;
variance_residuelle = var(residus) ;
coefficient_correlation_r2 = variance_expliquee/variance_d_origine
  4 comentarios
Daniel Mbadjoun
Daniel Mbadjoun el 20 de Nov. de 2019
The error show by Matlab is:
In Modele_propre_ (line 8) % K = M\QTU
Warning: Rank deficient, rank = 5, tol = 1.996410e-05.
K =
I obtain result of my program:
K =
4.513991002279457e+01
2.745762097557862e+00
-1.766261490412594e+03
5.146399884933867e-06
3.632648174417475e+00
0
coefficient_correlation_r2 =
9.998090847065179e-01
This result approaches the model.
The line which cause the error is:
K= M\QTU
How can i correct the error?
Adam Danz
Adam Danz el 20 de Nov. de 2019
Editada: Adam Danz el 20 de Nov. de 2019
If that line is causing the error, look into the values of M and QTU.
The message you shared shows a warning, not an error.
Perhaps this will help

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by