How can i use fill3 to make a box

15 visualizaciones (últimos 30 días)
axel rose
axel rose el 29 de En. de 2021
Comentada: axel rose el 30 de En. de 2021
X= [0 3 3 0]
Y= [0 0 2 2]
Z= [0 0 0 0]
fill3 (X, Y, Z, 'blue')
I used the code above to make a rectangle surface but it keeps showing
'Error in fill3 (line 4)
fill3 (X, Y, Z, 'blue')
how can i use fill3 to make a 3d box??

Respuestas (2)

Cris LaPierre
Cris LaPierre el 29 de En. de 2021
The issue appears to be that you have overwritten the fill3 function by naming your script/function fill3 as well. By doing so, MATLAB is now trying to use your file when you call fill3.
Change your file name to something else and MATLAB will again use its own fill3 function.

William
William el 29 de En. de 2021
That's odd. I cut and pasted the code from your question and ran it. It produced a blue rectangle in the z=0 plane, which I think is what you intended. There was no error message.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by