Hello I need to plot the function u(t,x) = cos (pi x)cos (pi t). where x, and t between 0 and 1. How can I plot this three dimension surface? With All Best Raed
Follow Math Help Forum on Facebook and Google+
Originally Posted by raed Hello I need to plot the function u(t,x) = cos (pi x)cos (pi t). where x, and t between 0 and 1. How can I plot this three dimension surface? With All Best Raed Code: --> x=linspace(0,1,10); --> t=linspace(0,1,10); --> [T,X]=meshgrid(t,x); --> U=cos(pi.*T).*cos(pi.*X); --> surf(X,T,U);
--> x=linspace(0,1,10); --> t=linspace(0,1,10); --> [T,X]=meshgrid(t,x); --> U=cos(pi.*T).*cos(pi.*X); --> surf(X,T,U);
View Tag Cloud