Where can I find fcn block in matlab R2020b?

I just downloaded matlab version 2020b and started simulink.
However I just can't find that fcn block.
Where is it in matlab version 2020b? and what is that block's name?

4 Comments

As in MATLAB 2021a version Fcn block is removed than which block is more suitable in its place...please let me know.
What gets put into the "Matlab Function Block", y = f(x), in order to convert a continuously ramping "x" to a "y" that
ramps from 0 to 2pi and resets to 0 and rises again.

Sign in to comment.

 Accepted Answer

From the documentation, it appears that the block has been removed from R2020b: https://www.mathworks.com/help/simulink/ref_obsolete_blocks/fcn.html. It has been depreciated for several past releases. Use the MATLAB function block: https://www.mathworks.com/help/simulink/slref/matlabfunction.html, which is much more flexible and easy to use.

10 Comments

I am glad to be of help!!!
Using the MATLAB function block instead of the fcn block caused the Simulink model to run much, much slower.
Personal opinion: The MATLAB Function block is much worse than the original Fcn block.
You can't insert time independent parameters from a MATLAB workspace into it directly, you have to load them as constants and insert them into the funciton as inputs. This clutters up the simulink model considerably and adds extra steps to basic tasks such as calling a simple function.
It's worse, actually
I suggest you have a look at https://www.mathworks.com/matlabcentral/answers/1653710-global-variable-in-simulink#comment_2009495 where I show how to construct Simulink global variables and parameter objects at the MATLAB level.
Thanks bro thats was helpful .

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Asked:

on 15 Oct 2020

Commented:

on 5 Dec 2024

Community Treasure Hunt

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

Start Hunting!