how i do a 3D plot of rect(n1,n2) function

8 Ansichten (letzte 30 Tage)
john m
john m am 14 Mär. 2021
Kommentiert: Star Strider am 15 Mär. 2021
how i do a 3D plot of rect(n1,n2) function
  1 Kommentar
Star Strider
Star Strider am 15 Mär. 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.)

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 14 Mär. 2021
Bearbeitet: KALYAN ACHARJYA am 14 Mär. 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';
  1 Kommentar
john m
john m am 15 Mär. 2021
Is this the only way to plot a rectangular? Because i think there is (rect) function but you didn’t use it

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by