static variables in matlab?

5 ビュー (過去 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 Center および File ExchangeWhos についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by