Where can I find Fcn block in simulink in matlab R2022a?

In previous realeses of Matlab there was the "Fcn" block when I used Simulink, How can I avoid this problem in Matlab R2022a?

回答 (3 件)

Steven Lord
Steven Lord 2022 年 4 月 15 日

1 投票

Which of the blocks in the User-Defined Functions library do you want to use?
I'm guessing you want either MATLAB Function or Interpreted MATLAB Function.

6 件のコメント

Adolfo Marro
Adolfo Marro 2022 年 4 月 15 日
No, I said that in previous releases there was simply the block "Fcn" to create functions with u(1) and u(2) in it. In R2022a there is no more this block, so I ask you: How can I put a simple expression in Simulink such as "sin(u1)" without that "Fcn" block
Sam Chak
Sam Chak 2022 年 4 月 15 日
編集済み: Sam Chak 2022 年 4 月 15 日
You can use the Interpreted MATLAB Function to achieve basically the same thing for simple inputs and static nonlinearity.
Else, you can find older version of Simulink file that contains the Fcn block. Then, copy the block to your Simulink model in R2022a.
Les Beckham
Les Beckham 2022 年 4 月 15 日
編集済み: Les Beckham 2022 年 4 月 15 日
I think it has been renamed "Math Function". Documentation is here.
Other common math operations (such as sin) are documented here.
Sam Chak
Sam Chak 2022 年 4 月 15 日
編集済み: Sam Chak 2022 年 4 月 15 日
@Les Beckham, the Math function block has been there in the Math Operations library. @Adolfo Marro is looking for the Fcn block that was available in previous Simulink versions (I think in pre-R2020 releases).
The Fcn block comes in handy for user who wishes to quickly enter a relatively simple equation such as:
u(1) + sin(u(2))*tan(u(3)) + cos(u(2))*tan(u(3))
without pulling multiple trigonometric function blocks, product blocks and summation blocks.
Les Beckham
Les Beckham 2022 年 4 月 15 日
@Sam Chak, oh, yes, I remember that block now. It has been a while since I worked with Simulink. As you said, the Interpreted Matlab Function block appears to be the replacement.
Andreas
Andreas 2023 年 1 月 12 日
@Sam Chak But the interpreted matlab function is set to be removed in the future as well.
"The Fcn block comes in handy for user who wishes to quickly enter a relatively simple equation such as:
u(1) + sin(u(2))*tan(u(3)) + cos(u(2))*tan(u(3))"
Exactly. Any better way to achive this?

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

Harun GIRGIN
Harun GIRGIN 2022 年 11 月 28 日

0 投票

Thank you all and your answers. These helped a lot.
Sam Chak
Sam Chak 2023 年 1 月 12 日

0 投票

You can try if the following blocks from the older release still work in your system.

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 4 月 15 日

回答済み:

2023 年 1 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by