Density-Temperature diagram

I have this semilog diagram with temperature (y axis) and viscosity(x axis). The diagram is linear. Chosen one type of oil, I need an equation that returns viscosity's values entering a particular value of temperature. How can i do? I've tried something like this, but it's totally wrong:
x =[10,50];
y =[50,0];
C = polyfit(log10(x),y,1);
m = C(1);
k = C(2);
T = 100;
vi = polyval(C,log10(x))

1 件のコメント

Rafael Hernandez-Walls
Rafael Hernandez-Walls 2020 年 9 月 29 日
x =[10,50];
y =[50,0];
C = polyfit(log10(x),y,1);
m = C(1);
k = C(2);
T = 100;
vi = polyval(C,log10(x))

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

回答 (1 件)

Alan Stevens
Alan Stevens 2020 年 9 月 29 日
編集済み: Alan Stevens 2020 年 9 月 29 日

0 投票

Perhaps you should have T instead of x in the last line (and have you got the two parameters the wrong way round? You want to get viscosity (x) from temperature (y)).. Also look up interp1.
x =[10,50];
y =[50,0];
C = polyfit(y,log10(x),1);
m = C(1);
k = C(2);
T = 100;
vi = polyval(C,T);
vi = 10^vi;

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

タグ

質問済み:

2020 年 9 月 28 日

編集済み:

2020 年 9 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by