t = timer('TimerFcn','launch','StartDelay',1);
start(t)
stat=1;
while(true)
% set_param(gcs,'StopTime','inf'
set_param(gcs,'StopTime', sprintf('%d',t));
% set_param(gcs,'StopTime', '10');
set_param(gcs,'Simulationcommand','start')
% pause(1)
% set_param(gcs,'Simulationcommand','pause')
% pause(0.00001)
set_param(gcs,'Simulationcommand','update')
set_param(gcs','Simulationcommand','continue')
% [columns,rows] = size(x_T)
% answer=x_T(columns,rows)
end
if true
% code
end
This is my code