App designer - How do i clear all variables?
21 次查看(过去 30 天)
显示 更早的评论
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 个评论
另请参阅
类别
在 Help Center 和 File 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!