Borrar filtros
Borrar filtros

static variables in matlab?

2 visualizaciones (últimos 30 días)
Pradeep Gowda
Pradeep Gowda el 5 de Abr. de 2015
Comentada: Pradeep Gowda el 5 de Abr. de 2015
basically i have a GUI for image compression , in which i need to plot a graph for input values(quality) and output(PSNR), but i need minimum of 5 values, as i tried to store the inputs and outputs in an array it stores only the current execution values but i need to retain the values of all other previous inputs and outputs. is there a way to achieve this?

Respuesta aceptada

Geoff Hayes
Geoff Hayes el 5 de Abr. de 2015
Pradeep - if you are using GUIDE to create your GUI, then you can use the handles structure, with the appropriate calls to guidata, to store your data. Else consider using persitent to retain the value of local variables between calls to the function where these variables have been declared.
  1 comentario
Pradeep Gowda
Pradeep Gowda el 5 de Abr. de 2015
Thanx , but i used global variables and got solution. I know using global variables is not efficient but i gave it a try , it worked.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by