Get value of a variable
古いコメントを表示
-file display.m-
TYPE1 = {'AUDI','MARIA OWN THIS GREAT CAR'};
selectedCar = handles.popupmenu1.Value;
switch selectedCar
case 2
owners = TYPE1;
end;
-file modify.m-
here i have a pop up and an edit text
How cand I call variable TYPE1 from file display.m, display it on edit text and after that re writing it back to same variable on display.m
Thank you!
3 件のコメント
Geoff Hayes
2022 年 5 月 17 日
@Cristian Martin - how are the display.m and modify.m files related to your GUI? Are they scripts or functions that you want to call from the GUI? Please clarify the flow. Also please confirm if you are using GUIDE (I think you are).
Cristian Martin
2022 年 5 月 17 日
Geoff Hayes
2022 年 5 月 17 日
@Cristian Martin - can you show some of the code or post the two files? I'm just curious as to what data is being written to these files. It may be simpler to just keep the data (that is written to the file) as a variable/property of the handles struct so that you don't have to open the file to read the contents just to write to the edit text control. Unless you are allowing the user to write data to the file via the GUI
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Text Data Preparation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
