This is the first part of my program, however I'd like the whole program to stop running and end, if , the choice is 'yes'. Because currently the code just keeps on running even after loading the saved model.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Youssef Barakat
il 7 Mag 2021
Commentato: Youssef Barakat
il 7 Mag 2021
choice = questdlg('Would you like to load a saved spatial model?','Spatial Model','Yes','No, create new spatial model','No, create new spatial model');
if isequal(choice,'Yes')
disp('A previously saved spatial model has been loaded into the system');
load spatialModel.mat
else isequal(choice,'No, create new spatial model')
disp('Starting a new spatial model~~~~~~~~~~~~~~~~~');
end
0 Commenti
Risposta accettata
David Fletcher
il 7 Mag 2021
return should give control back to whatever invoked the script
choice = questdlg('Would you like to load a saved spatial model?','Spatial Model','Yes','No, create new spatial model','No, create new spatial model');
if isequal(choice,'Yes')
disp('A previously saved spatial model has been loaded into the system');
load spatialModel.mat
return
else isequal(choice,'No, create new spatial model')
disp('Starting a new spatial model~~~~~~~~~~~~~~~~~');
end
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Programmatic Model Editing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!