필터 지우기
필터 지우기

static variables in matlab?

조회 수: 2 (최근 30일)
Pradeep Gowda
Pradeep Gowda 2015년 4월 5일
댓글: Pradeep Gowda 2015년 4월 5일
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?

채택된 답변

Geoff Hayes
Geoff Hayes 2015년 4월 5일
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
Pradeep Gowda
Pradeep Gowda 2015년 4월 5일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by