about plot function with 4 variable in term of 1 variable

I want to draw a function (is s) in terms of g can you help me?
>> syms t
>> a=t/n;
>> syms g
>> s=(g*exp(-a*g))/(g*(1+2*a)+exp(-a*g))

 採用された回答

Birdman
Birdman 2018 年 1 月 12 日

0 投票

Something like this?
syms s(g,t,n)
s=(g.*exp((-t./n).*g))./(g.*(1+2.*(t./n))+exp((-t./n).*g));
nn=subs(n,1);
tt=subs(t,0:0.1:5);
gg=subs(g,1);
s=vpa(subs(s,{g,t,n},{gg,tt,nn}),4);
plot(tt,s)

その他の回答 (0 件)

タグ

質問済み:

2018 年 1 月 12 日

コメント済み:

2018 年 1 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by