ワークスペース上の変数をAppDesignerでプロットする
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mamoru Mabuchi
le 28 Mai 2020
Réponse apportée : Kojiro Saito
le 28 Mai 2020
MATLABワークスペースから、AppDesigerへの変数の受け渡し方法がわかりません。
例えば下記のような変数x,yがMATLABのワークスペース上に定義されているとします。
x=1:10;
y=sin(x);
このAppDesigerでグラフをプロットするにはどのようにすれば良いでしょうか?
0 commentaires
Réponse acceptée
Kojiro Saito
le 28 Mai 2020
evalinコマンドでワークスペースから変数を取ってくればできます。
座標軸を(app.UIAxes)をApp Designerの設計ビューに置いて、
以下のようなコマンドをアプリのstartupFcnやボタンのコールバックに入れてみてください。
x = evalin('base','x');
y = evalin('base','y');
plot(app.UIAxes, x, y)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur App Designer を使用したアプリ開発 dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!