App designer - How do i clear all variables?
28 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hey guys,
I created an App within App designer.
It works in mostly all cases perfect... except in one case.
This case is if I load a second smaller (with less datapoints) mat file then I get an error:
% Error using horzcat
% Dimensions of arrays being concatenated are not consistent.
%
% Error in app3/LoadFile (line 1228)
% AllHallsInOne_Deg = [Hall_1 DegAllHalls; Hall_2
% DegAllHalls; Hall_3 DegAllHalls];
%
% Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
% Error while evaluating Button PrivateButtonPushedFcn.
I´m understanding the error but it should not appear? Because im deleting the relevant variables and let the app create and fill the variables. But it seems that it is not deleting the data and it trys to concatenate the old variable with the new or adds the new to the old data.
So the question is how do I delete variables/parameters properly in app designer?
I tried
clear varname
or
varname = []
also
delete(varname)
It is my first app... but I´m not able to handle this problem.
Thanks in advance!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!