Borrar filtros
Borrar filtros

how to plot meshgrid and mesh

73 visualizaciones (últimos 30 días)
NIMA RAHMANI MEHDIABADI
NIMA RAHMANI MEHDIABADI el 15 de Mayo de 2019
Respondida: madhan ravi el 15 de Mayo de 2019
so im trying to plot a meshgrid and mesh for a function of z = 2xsin^2(x)
so my code is;
clear;
x = linspace(-3,3);
y = linspace(1,3);
[x,y] = meshgrid(x,y);
z = 2.*x.*(sin(x)).^2;
mesh(x,y,z)
meshgrid(x,y,z)
however to plot the meshgrid graph it gives mee an error. Can someone plz help me with this?
Thanks

Respuesta aceptada

madhan ravi
madhan ravi el 15 de Mayo de 2019
Remove last line.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by