Rank deficient error, how to avoid it

27 ビュー (過去 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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by