How can I save a gui window with input data ?

2 ビュー (過去 30 日間)
Omid Rezapour
Omid Rezapour 2019 年 9 月 30 日
コメント済み: Ankit 2019 年 9 月 30 日
Hello
I made a gui window for calculating some parameters (photo in attachment). When I run the gui program, I insert the inputs in yellow edit boxes and push the "Calculate Outputs" button, then the outputs are shown in green static boxes. My Problem is that when I close this gui window and open (run) it in the next time, the inputs are gone (reset) and I should insert them again. Is there any way to keep (save) the input numbers in the yellow boxes for the next time ?
Thank you
Photo.png
  1 件のコメント
Ankit
Ankit 2019 年 9 月 30 日
Yes! you can add may be following menu to your GUI
  • Initialize (Initalize with some default values)
  • Save GUI state (saving GUI data as *.mat file) (for e.g saving VehicleMass = app.xxx.Value etc)
  • Load GUI state (loading the desired GUI state) - loading *.mat fle and using "evalin" function read the values

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeScope Variables and Generate Names についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by