switch-case interaction with uigetfile
이전 댓글 표시
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
답변 (2개)
Paulo Silva
2011년 3월 6일
0 개 추천
Your code is working without any problems in matlab 2008b.
댓글 수: 4
Eric
2011년 3월 6일
Eric
2011년 3월 6일
Paulo Silva
2011년 3월 6일
Might be many things, please wait until more people test it.
Oleg Komarov
2011년 3월 6일
Is that the whole code you have in the function?
Walter Roberson
2011년 3월 7일
0 개 추천
Put a breakpoint in menu() and experiment to see what is going on.
카테고리
도움말 센터 및 File Exchange에서 App Building에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!