"Value must be a handle" error during Patch

5 visualizaciones (últimos 30 días)
Matteo Bottin
Matteo Bottin el 13 de Dic. de 2016
Respondida: Matteo Bottin el 13 de Dic. de 2016
Hi!
I'm a Matlab beginner. I was trying to plot a parallelepiped with the patch command. This is the list of my faces:
ff =
1 2 4 3 1
1 2 6 5 1
5 6 8 7 5
3 4 8 7 3
2 4 8 6 2
1 3 7 5 1
and this is the list of my nodes:
nodes =
0 0 0
0 0 20
0 10 0
0 10 20
15 0 0
15 0 20
15 10 0
15 10 20
then I use this code to plot the geometry:
patch('Face',ff,'vertices',nodes2)
but I only get this error:
Error using patch
While setting the 'Face' property of 'Patch':
Value must be a handle.
I get this message even if i try to plot single faces indipendently. Where am I failing?

Respuesta aceptada

KSSV
KSSV el 13 de Dic. de 2016
ff = [1 2 4 3 1
1 2 6 5 1
5 6 8 7 5
3 4 8 7 3
2 4 8 6 2
1 3 7 5 1] ;
nodes = [ 0 0 0
0 0 20
0 10 0
0 10 20
15 0 0
15 0 20
15 10 0
15 10 20] ;
patch('Faces',ff,'vertices',nodes)

Más respuestas (1)

Matteo Bottin
Matteo Bottin el 13 de Dic. de 2016
I managed to find what was wrong: i was in debug mode. Stepping out to normal mode and everything worked. Sorry for this post.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by