Not valid variable name despite variable declaration i MATLAB app designer.
Show older comments
After the analysis of the images, I want to save the parameters in .mat file. The following code is for the same,
function SaveButtonPushed(app, event)
app.filename = strcat(app.filename,'.mat');
if isempty(app.FLG)
save(app.filename,'app.para_BF_new','app.ROI')
elseif isempty(app.FLR)
save(app.filename,'app.para_BF_new','app.para_FLG','app.ROI')
elseif isempty(app.FLFR)
save(app.filename,'app.para_BF_new','app.para_FLG','app.para_FLR','app.ROI')
else
save(app.filename,'app.para_BF_new','app.para_FLG','app.para_FLR','app.para_FLFR','app.ROI')
end
However, the following error is coming in MATLAB app designer but is working fine as simple Matlab code. I have already declared all the variables properly.
Error using save
'app.para_BF_new' is not a valid variable name.
Error in SpehroidAnalysisApp/SaveButtonPushed (line 181)
save(app.filename,'app.para_BF_new','app.ROI')
Error in matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 62)
newCallback = @(source, event)executeCallback(ams, ...
Error while evaluating Button PrivateButtonPushedFcn.
Accepted Answer
More Answers (0)
Categories
Find more on Workspace Variables and MAT Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!