Rank deficient error, how to avoid it

조회 수: 28 (최근 30일)
Daniel Mbadjoun
Daniel Mbadjoun 2019년 11월 20일
편집: Adam Danz 2019년 11월 20일
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
Daniel Mbadjoun
Daniel Mbadjoun 2019년 11월 20일
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 2019년 11월 20일
편집: Adam Danz 2019년 11월 20일
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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by