Info

此问题已关闭。 请重新打开它进行编辑或回答。

How I can modify StopTime with an Inputdlg?

1 次查看(过去 30 天)
alfred
alfred 2017-7-28
关闭: MATLAB Answer Bot 2021-8-20
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 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by