フィルターのクリア

Approximate a log curve as linear to predict a value

5 ビュー (過去 30 日間)
Brian Robinson
Brian Robinson 2020 年 5 月 29 日
編集済み: Matt J 2020 年 5 月 29 日
Hello there,
I have the following code:
clf
P = [0.01; 0.1; 1; 3; 5; 10; 25; 50; 75; 90; 95; 97; 99; 99.9];
phi_1 = [5.28; 4.10; 2.82; 2.15; 1.82; 1.33; 0.59; -0.12; -0.72; -1.18; -1.42; -1.57; -1.81; -2.14];
Cs_1 = Cv_Q
K_p_1 = Cv_Q.*phi_1 + ones(length(phi_1),1);
Q_p_1 = meanQ*K_p_1;
semilogx(P, Q_p_1)
Which produces this curve
My plan is to approximate a line from P = 0.01 and P = 0.1 and then plot this line to predict the Q_p value at P = 0.01.
What is the best way to go about this?
Thanks,
Brian
  4 件のコメント
Adam Danz
Adam Danz 2020 年 5 月 29 日
What is this?
meanQ*K_p_1
Brian Robinson
Brian Robinson 2020 年 5 月 29 日
Hi Adam,
meanQ = 2775
K_p =
4.76406175741670
3.92285098587282
3.01035116589301
2.53271454137233
2.29746068153379
1.94814434419777
1.42060538577194
0.914453141876893
0.486718851261359
0.158789228456116
-0.0123044877900973
-0.119238060443981
-0.290331776690195
-0.525585636528738

サインインしてコメントする。

採用された回答

Matt J
Matt J 2020 年 5 月 29 日
編集済み: Matt J 2020 年 5 月 29 日
idx=(P<=0.1);
c=polyfit(log10(P(idx)),Q_p_1(idx),1);
semilogx(P, Q_p_1, P,polyval(c,log10(P)),'x-' )

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by