how to plot a wave propagation using surface plot.
Mostrar comentarios más antiguos
hi all, i m facing a problem to ploting a wave function in 3d plot or surface or contour plot.i ploteed that wave in 2d. the coding for that i used is f=1.0e6; fs=f*100; n=3; t=0:1/fs:n/f; y=15*(1-cos(2*pi*f*t/n)).*sin(2*pi*f*t); plot(t,y); ylabel('amplitude'); xlabel('time'); now i have to plot this function as surface plot or counter plot.how i can do this????????
Respuesta aceptada
Más respuestas (1)
Dishant Arora
el 1 de Sept. de 2012
f=1.0e6;
fs=f*100;
n=3;
t=0:1/fs:n/f;
T=meshgrid(t);
y=15*(1-cos(2*pi*f*T/n)).*sin(2*pi*f*T);
surf(T,y);
ylabel('amplitude');
xlabel('time');
5 comentarios
kavya saxena
el 1 de Sept. de 2012
Dishant Arora
el 1 de Sept. de 2012
Editada: Dishant Arora
el 3 de Sept. de 2012
check this out, it works
kavya saxena
el 3 de Sept. de 2012
Dishant Arora
el 3 de Sept. de 2012
well, i am not getting what you want. btw, check out the following link. http://www.mathworks.com/matlabcentral/fileexchange/35305-matlab-plot-gallery-surface-plot-1/content/html/Surface_Plot_1.html
may be you are looking for this kinda plot.
kavya saxena
el 4 de Sept. de 2012
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!