using get_Param inside an S-function
Mostrar comentarios más antiguos
function [sys]= mdlOutputs(t,x,u,flag,Label)
tSTOP = get_param('Model','StopTime');
if(tSTOP == (1000*ceil(t/1000)))
fclose(FID);t
end
sys = [];
return;
end
tSTOP is not seen inside the 'if' loop. The value of 't' does not get printed out. If I replace tSTOP with the numerical value of tTSOP it works fine. Any help is appreciated.
3 comentarios
Aswartha Narayana
el 28 de Nov. de 2011
Aswartha Narayana
el 28 de Nov. de 2011
Walter Roberson
el 8 de Dic. de 2011
There is no such thing as an if loop.
Respuestas (2)
Aswartha Narayana
el 28 de Nov. de 2011
0 votos
Guy Rouleau
el 29 de Nov. de 2011
0 votos
What you are doing (closing the file) should be done in mdlTerminate!
Categorías
Más información sobre Model, Block, and Port Callbacks en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!