What is the script to plot the following function in MatLab? (I don't have syms function, those are ln(r) in function)

2 ビュー (過去 30 日間)
Benjamin Shaw
Benjamin Shaw 2022 年 12 月 10 日
回答済み: Voss 2022 年 12 月 10 日

回答 (1 件)

Voss
Voss 2022 年 12 月 10 日
% One way
f = @(r)0.25*r.^2 - 1.821*log(r) + 0.249 + 0.455*log(r) - 0.5;
fplot(f);
% Another way
r = 0.05:0.001:5;
y = 0.25*r.^2 - 1.821*log(r) + 0.249 + 0.455*log(r) - 0.5;
plot(r,y)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by