Borrar filtros
Borrar filtros

How can I use the image data stored in setappdata twice in my code?

2 visualizaciones (últimos 30 días)
I stored an image data using setappdata in this function. I would like to use this image data twice in 2 separate functions. How can this be done?

Respuesta aceptada

Walter Roberson
Walter Roberson el 15 de En. de 2016
Either use nested functions and shared variables, or getappdata() in both functions where you need the data.
  3 comentarios
Walter Roberson
Walter Roberson el 15 de En. de 2016
getappdata() does not display data; you need to imshow() or image() or imagesc() the retrieved data.
And of course the retrieval has to be after the data has been stored; in your second case your flow of routines might not have stored it yet.
Gee Cheng Mun
Gee Cheng Mun el 16 de En. de 2016
yes! I got it, thank you so much for all your help!:)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by