Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

how make exe program produced from matlab excute many times

1 visualización (últimos 30 días)
mangood UK
mangood UK el 20 de Feb. de 2013
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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);
N =str2double(answer(1,:));
step=str2double(answer(2,:));
ymin=str2double(answer(3,:));
ymax=str2double(answer(4,:));
xmin=str2double(answer(5,:));
xmax=str2double(answer(6,:));
dis =inputdlg( cellstr( num2str((1:N).', 'distance number %d') ),dlgtitle,no );
% answer_str = char(answer);
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');

Respuestas (0)

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by