Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How I can modify StopTime with an Inputdlg?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I need that the user can select diferent StopTime depends on the system. I create an inputdlg for introduce the value of StopTime that the user wants but how I can do for change the value of StopTime inside setparam('systemname','StopTime',...)
I try to put like a variable.. but it doesn't works...
PART OF PROGRAM:
ParamSimulacio = {'Introdueix el temps total de simulació','Introdueix el temp de mostreig'};
titol = 'Selecció del temps de simulació';
num_linies = 1;
valorsperdefecte = {'0','0'};
cuadredialeg = inputdlg(ParamSimulacio,titol,num_linies,valorsperdefecte);
TempsSimulacio = str2num(cell2mat(cuadredialeg));
Tstop=TempsSimulacio(1,1);
Ti=TempsSimulacio(2,1);
set_param('Tancs_Dades_Reals','StopTime',Tstop,'FixedStep','Ti');
Thanks!
0 Commenti
Risposte (0)
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!