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))

 Risposta accettata

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)

Più risposte (0)

Tag

Richiesto:

il 12 Gen 2018

Commentato:

il 12 Gen 2018

Community Treasure Hunt

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

Start Hunting!

Translated by