using get_Param inside an S-function
Ältere Kommentare anzeigen
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 Kommentare
Aswartha Narayana
am 28 Nov. 2011
Aswartha Narayana
am 28 Nov. 2011
Walter Roberson
am 8 Dez. 2011
There is no such thing as an if loop.
Antworten (2)
Aswartha Narayana
am 28 Nov. 2011
0 Stimmen
Guy Rouleau
am 29 Nov. 2011
0 Stimmen
What you are doing (closing the file) should be done in mdlTerminate!
Kategorien
Mehr zu Model, Block, and Port Callbacks finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!