Arrays on AppDesigner.

6 visualizaciones (últimos 30 días)
Nestor Flores
Nestor Flores el 6 de Mayo de 2021
Comentada: Ajiket Patil el 20 de Mayo de 2021
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;
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 comentario
Ajiket Patil
Ajiket Patil el 20 de Mayo de 2021
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
%% 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

Iniciar sesión para comentar.

Respuestas (0)


Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.




Community Treasure Hunt

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

Start Hunting!

Translated by