plotting a graph in a range

2 ビュー (過去 30 日間)
Seungryul Lee
Seungryul Lee 2022 年 9 月 27 日
回答済み: Torsten 2022 年 9 月 27 日
Hi, I want to plot a graph of the value of ratio as a function of the temperature in the range of 283k to 313k.
R = 2.303 * 8.314;
T = 273 + 20;
F = 96500;
ratio = @(eqv,z) exp(eqv*(z*F)/(R*T));
%I'm using eqv=-0.06, z=1 for the ratio function.
ratio = @(T,eqv,z) exp(eqv*(z*F)/(R*T));
T = (283:313);
plot(T, ratio(T,-0.06,1))
This is the code I have for the ratio function, and the last three lines are what I did for plotting, but it's giving an error about the matrix dimension, the ratiov function, and the plot also.
Please help!
Thank you.

採用された回答

Torsten
Torsten 2022 年 9 月 27 日
R = 2.303 * 8.314;
F = 96500;
ratio = @(T,eqv,z) exp(eqv*(z*F)./(R*T));
T = 283:313;
plot(T, ratio(T,-0.06,1))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Identification についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by