How to plot a triangular prism ?
Mostrar comentarios más antiguos
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 comentario
Chaya N
el 23 de Oct. de 2016
I think your figure is drawn wrong! Please check points E and F (the z co-ordinates in particular).
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
