Arrays on AppDesigner.

7 次查看(过去 30 天)
Nestor Flores
Nestor Flores 2021-5-6
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 CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by