How to plot a triangular prism ?
Afficher commentaires plus anciens
Hi, Guys I just started using Matlab and I would like to how to plot 3d figure for co-ordinates shown in the image which happens to be a triangular prism. The co-ordinates of point c are (-1,3,2). I tried using PATCH command and got two funny triangles. I have mentioned the code I used below. I am really new to Matlab so if you could please explain your answer for a noobie it would much be appreciated. thanks in advance
X = [1 -1 1 -1 1 -1]
Y = [3 3 5 5 3 3]
Z = [0 0 2 2 2 2]
patch(X,Y,Z)

1 commentaire
Chaya N
le 23 Oct 2016
I think your figure is drawn wrong! Please check points E and F (the z co-ordinates in particular).
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Distribution Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
