using get_Param inside an S-function
古いコメントを表示
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 件のコメント
Aswartha Narayana
2011 年 11 月 28 日
Aswartha Narayana
2011 年 11 月 28 日
Walter Roberson
2011 年 12 月 8 日
There is no such thing as an if loop.
回答 (2 件)
Guy Rouleau
2011 年 11 月 29 日
0 投票
What you are doing (closing the file) should be done in mdlTerminate!
カテゴリ
ヘルプ センター および File Exchange で Model, Block, and Port Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!