switch-case interaction with uigetfile
Show older comments
The following code seems straightforward. But the dialog box showing the files only appears briefly. It seems to be a condition associated with the switch-case construction because uigetfile works o.k. in testg.m outside of the switch-case.
The same action happened with uiopen.
Suggestion for a cure?
function [ ] = testg()
menu_choice = menu('Design Tools', 'Set Up Design File', 'Vehicle Aerodynamics');
switch menu_choice
case 1
[FileName, PathName] = uigetfile('*.mat');
case 2
disp('Aero!');
end
Answers (2)
Paulo Silva
on 6 Mar 2011
0 votes
Your code is working without any problems in matlab 2008b.
4 Comments
Eric
on 6 Mar 2011
Eric
on 6 Mar 2011
Paulo Silva
on 6 Mar 2011
Might be many things, please wait until more people test it.
Oleg Komarov
on 6 Mar 2011
Is that the whole code you have in the function?
Walter Roberson
on 7 Mar 2011
0 votes
Put a breakpoint in menu() and experiment to see what is going on.
Categories
Find more on App Building 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!