필터 지우기
필터 지우기

while loop with questdlg box

조회 수: 1 (최근 30일)
Tomas
Tomas 2012년 4월 25일
Hello, I would like to know is it possible to make such a program with while loop and questdlg box, that would calculate sum of variable e.g. 'F' in each new .msi file selection:
Here is my code:
P=1;
while P>0
s=uigetfile('.msi');
a=importdata(s,' ',5);
c=[a.data];
c(1,:)=[];
c(361,:)=[];
g=getfield(a, 'textdata');
F = cellfun(@(g) str2double(g(11:end)),g(2,1));
DBD = cellfun(@(g) str2double(g(6:end-3)),g(3,1));
choice=questdlg('one more?','take or not', 'default');
switch choice
case 'Yes'
P=1;
case 'No'
P=0;
case 'cancel'
P=0;
end
end
Please suggest your ideas :)
  댓글 수: 5
Tomas
Tomas 2012년 4월 25일
Yes, You are right, I forgot to add P=1.
The program should ask user for .msi file to open, then get a name of file that is needed to import, after that pick 'F' value and all rest. So I want to do this multiple times and calculate all of those .msi files 'F' values in one.
Tomas
Tomas 2012년 4월 25일
Solved, ty for all your time :)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by