How can I plot a multivariable function?
Afficher commentaires plus anciens
syms x t r >> l=10; >> c=1500; >> w=1; >> z=(2/(r*c*pi))*(int(10*sin((r*pi*w)/l),0,l)*sin((r*c*pi*t)/l)); y=(2/l)*(int(sin((r*pi*w)/l),0,l))*cos((r*c*pi*t)/l); u(x,t)=symsum(sin((r*pi*x)/l)*(y+z),r,1,5)
u(x, t) =
sin((pi*x)/10)*((4*cos(150*pi*t))/pi + (4*sin(150*pi*t))/(15*pi^2)) + sin((pi*x)/5)*((4*cos(300*pi*t))/pi + (2*sin(300*pi*t))/(15*pi^2)) + sin((3*pi*x)/10)*((4*cos(450*pi*t))/pi + (4*sin(450*pi*t))/(45*pi^2)) + sin((2*pi*x)/5)*((4*cos(600*pi*t))/pi + sin(600*pi*t)/(15*pi^2)) + sin((pi*x)/2)*((4*cos(750*pi*t))/pi + (4*sin(750*pi*t))/(75*pi^2))
>> ezplot(u) >> x=0:20; >> ezplot(u) >> ezplot(u(x,t),x) Error using inlineeval (line 14)
I have been trying to plot the sum function u(x,t) and I want the graph axis to be u(x,t) and x. But I am having a problem. It only plots x and t but the results are not correct in this graph too.
Réponses (0)
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!