Arrays on AppDesigner.

7 ビュー (過去 30 日間)
Nestor Flores
Nestor Flores 2021 年 5 月 6 日
コメント済み: Ajiket Patil 2021 年 5 月 20 日
I'm working on an App for calculus of an electromagnet, Already have a .m file code that is working.
I'm using something like this...
CM_A(1) = 167.800;
CM_A(2) = 133.100;
CM_A(3) = 105.600;
CM_A(4) = 83.690;
CM_A(5) = 66.360;
CM_A(6) = 52.620;
And something like this...
for i=1:13
Ro_guia(i) = 0;
Radio_guia(i) = 0;
I_guia(i) = 0;
rho_guia(i) = 0;
CM_guia(i) = 0;
end
But in appdesigner is not defined like a variable and don't know how to do it.
Also, there is a variable calculated from two variables, but program says "Matrix dimensions must agree" while both values are not matrix or arrays.
BTW... is there a complete guide on pdf for using appdesigner?
Thank you.
  1 件のコメント
Ajiket Patil
Ajiket Patil 2021 年 5 月 20 日
In app designer variables are stored in workspace as in .m files (Since app designer uses local functions to perform tasks).
If you want to use variables in multiple functions/buttons of the app designer
properties (Access = private)
var1; % variable 1
var2; % variable 2
end
%% accessing variables elsewhere in the app designer functions
var3 = app.var1-app.var2; % computing variable 3 using defined variables 1 and 2 earlier
For Guide on app designer you may follow
https://www.youtube.com/watch?v=iga-YS6VbyE

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by