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