Design an x-y plot for the following where the values of x are from 0 to 20π with a spacing of π/100

Design an x-y plot for the following where the values of x are from 0 to 20π with a spacing of π/100.
a. y = x.sin(x)
b. z = x.cos(x)
c. Convert the above 2D into a 3D plot using z as the third axis

 Respuesta aceptada

try this..
x=0:pi/100:20*pi;
y=x.*sin(x);
z=x.*cos(x);
plot(x,y);
plot(x,z);
plot3(x,y,z);
grid on;

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 28 de Mayo de 2015

Respondida:

el 28 de Mayo de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by