Initialize MATLAB-Function
2 ビュー (過去 30 日間)
古いコメントを表示
Saeed Ahmadzadeh Mahboobi
2020 年 11 月 19 日
回答済み: Ameer Hamza
2020 年 11 月 19 日
Hello
I've read in the previous questions, that initializing a MATLAB-Function in Simulink is done like:
persistent j;
if isempty(j)
j = 1;
end
And I have done so. Then I use the value j.
The problem is, as I want to run the simulink model, I get the following error:

Any ideas how to solve this problem?
Thanks.
0 件のコメント
採用された回答
Ameer Hamza
2020 年 11 月 19 日
This is not really an error. It just tells that you need to change the sampling rate of this block from continuous to discrete. Just click the "Fix" button on the first box under "Suggested actions" and the error will be fixed.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!