フィルターのクリア

Why the "Fcn" Simulink block is no longer available since R2020a version?

53 ビュー (過去 30 日間)
Marcelo
Marcelo 2022 年 9 月 14 日
コメント済み: Oliyad 2024 年 2 月 5 日
I am using R2021a version and, when I tried to use the Simulink "Fcn" block, I got very surprised in seing that this block is no longer available since R2020a version.
The Help page only says the following: "The Fcn block is no longer available in the Simulink > User-Defined library and is not recommended. For more complicated expressions, use the MATLAB Function block. For less complicated expressions, consider replacing with blocks that model the same behavior."
Before migrate to R2021a version, I used to use this "Fcn" block a lot and it was very helpful in many situations.
My question about it is: why this "Fcn" block is not recommended anymore? Is it something related to performance issues?
I tried to get the answer for this but i didn't find it anywhere.
I would appreciate if someone could give me some orientation about it.
Thanks.
  2 件のコメント
Walter Roberson
Walter Roberson 2022 年 9 月 14 日
You cannot do acceleration with those blocks -- they only interpret MATLAB code.
Marcelo
Marcelo 2022 年 9 月 15 日
Hi, Walter,
Thanks for your response.
Can I ask you how did you find this? When you say it is not possible to do acceleration with Fcn block, do you mean to simulate it in "Accelerator" and "Rapid Accelerator" modes?
Because, when I build a Simulink model in R2019b version and use a Fcn block inside it, I can run this model in "Accelerator" mode and also in "Rapid Accelerator".
And, in R2021a version, this Fcn block is not available anymore even to do a similar test.

サインインしてコメントする。

採用された回答

Vignesh Murugavel
Vignesh Murugavel 2022 年 10 月 4 日
The current impact is that, you will not be able to create Fcn block from library. But you will be able to use models migrated from previous release that contains the block.
The reasons for deprecating the Fcn block are:
  • MATLAB function block includes all the functions available in the fcn block and supports much more functions. Maintaining two blocks with similar capabilities often results in challenges for users, including confusions and inconsistent results in some edge cases.
  • One example of inconsistency is function names between the Fcn block and MATLAB function blocks, i.e. sgn() in Fcn block v.s. sign() in MATLAB function block.
  • Generated code is different in some cases. Code generation for the MATLAB function block usually interacts better with other blocks in the model.
If you need help to find the Fcn block in recent release, please type "simulink_need_slupdate" in the command window to open the library where it is stored.
  3 件のコメント
Arsalan
Arsalan 2024 年 1 月 25 日
thank you dear
Oliyad
Oliyad 2024 年 2 月 5 日
thanks! but does have any effect if we use it?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSources についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by