Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

How to draw pyramid in MATLAB ?

MATLAB Program:



x = [0  0  1  1  0 .4
     1  1  1  0  0 .4
     1 .6 .6 .4 .4 .6
     0 .4 .6 .6 .4 .6];
y = [0  1  1  0  0 .4
     0  1  0  0  1 .6
     1 .6 .4 .4 .6 .6
     1 .6 .6 .4 .4 .4];
z = [0  0  0  0  0  1
     0  0  0  0  0  1
     0  1  1  1  1  1
     0  1  1  1  1  1];
patch(x,y,z,'y')
view(3);xyz,box

Output:


No comments

Popular Posts