Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How I can modify StopTime with an Inputdlg?

3 visualizzazioni (ultimi 30 giorni)
alfred
alfred il 28 Lug 2017
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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!

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by