how i do a 3D plot of rect(n1,n2) function
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
how i do a 3D plot of rect(n1,n2) function
1 comentario
Star Strider
el 15 de Mzo. de 2021
Please provide the documentatiion link to that function. (It is not present in the online documentation, and I cannot find it in an Interweb search.)
Respuestas (1)
KALYAN ACHARJYA
el 14 de Mzo. de 2021
Editada: KALYAN ACHARJYA
el 14 de Mzo. de 2021
n1=-1;
n2=1;
[x,y]=meshgrid(n1:0.01:n2,n1:0.01:n2);
z=zeros(size(x,1),size(x,2));
z(x>-0.5 & x<0.5)=1;
s=surf(x,y,z,'FaceAlpha',0.5);
s.EdgeColor = 'b';
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!