Hi,
I need to read in my text field the values from variables from a .m file.
For example, I want to read the Temp_R value in my MOT.Temp_R text field and if I change the value in the .m file, the next time I run the app changes too.
Thanks.

1 件のコメント

Daniel
Daniel 2022 年 10 月 13 日
Ok, with evalin().

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

 採用された回答

Image Analyst
Image Analyst 2022 年 10 月 13 日

0 投票

No, don't use evalin.
Attach your m-file that sets up (instantiates) your variables. Chances are it's a script that just defines variables and leaves them in the base workspace (so you'd have to use evalin). What you want to do it to turn that m-file into a function that returns the structures as output arguments.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeWorkspace Variables and MAT Files についてさらに検索

製品

リリース

R2022b

質問済み:

2022 年 10 月 13 日

回答済み:

2022 年 10 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by