Error: Cannot convert double value 5 to a handle

4 visualizaciones (últimos 30 días)
S H
S H el 22 de Mzo. de 2019
Comentada: S H el 22 de Mzo. de 2019
Please help me fix the following code and avoid getting "Cannot convert double value 5 to a handle" error.
set(h,'userdata',[sch(ii,1) ii h])
while h is a 1×9 graphics array:
Line Line Line Line Line Line Line Text Text

Respuesta aceptada

Stephen23
Stephen23 el 22 de Mzo. de 2019
Most likely sch(ii,1), ii, and h are actually all different classes which cannot be concatenated together.
You could easily use a cell array for storing heterogeneous data types:
set(h,'userdata',{sch(ii,1),ii,h})
  1 comentario
S H
S H el 22 de Mzo. de 2019
Amazing. Thank you Stephen. Your solution solved the error.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Annotations en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by