MATLAB: About plot function with 4 variable in term of 1 variable

%s

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

Best Answer

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