# how make exe program produced from matlab excute many times

1 view (last 30 days)
mangood UK on 20 Feb 2013
hi: i have this code
the problem in this program is that executed only one then closed
i need to re excited until push close button what function that can do this???
can i use while loop or something!!!!!!1
----------------------------------------------------------------
prompt={'enter number of distance ',
'enter the size of step ',
'ymin:',
'ymax',
'xmin',
'xmax'};
dlgtitle = 'Dr.nazar graph in 2D';
no = 1;
options.Resize='on';
options.Interpreter='tex';
value = {'','3','-20','20','-20','20'};
answer = inputdlg(prompt, dlgtitle, no, value, options);
dis =inputdlg( cellstr( num2str((1:N).', 'distance number %d') ),dlgtitle,no );
h=((xmax-xmin)/2)+xmin;
for i=1:N-1
distance(i)=str2double (dis(i,:))/2;
x(i)=h-distance(i);
x(N)=h;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end
for i=1:N-1
x(i+N)=h+distance(N-i);
end
start=2;
y(1)=ymin+start;
y(N)=y(1)+str2double (dis(N,:));
for i=2:N-1
y(i)=y(i-1)+step;
end
for i=1:N-1
y(2*N-i)=y(i);
end;
w=2*N-1;
j=[x(N-1) x(N) x(N+1:w)];
b=[y(1) y(N) y(N+1:w)];
patch(j ,b,'y');