is there any way by which we can link script .m file to simulink with multiple input and output without converting it into .c or .f file?

1 view (last 30 days)
I have my function which has 4 input and 2 output. with in that function another function is called. And the whole code is in .m . is there any way by which I can design a simulink block so that by linking it with function, it automatically executes my function.

Answers (1)

Walter Roberson
Walter Roberson on 27 Jul 2015
MATLAB Function Block
  2 Comments
Shil
Shil on 27 Jul 2015
I tried it. But it has some issue with the compiler compatibility.any reference u can give would be appreciated.
Walter Roberson
Walter Roberson on 27 Jul 2015
Whether you need the compiler depends upon the acceleration mode you are using.
If you want high acceleration then you may need to change the coding of the function a bit to make it possible to generate code. For lower acceleration levels, Simulink can call into MATLAB without using code generation.

Sign in to comment.

Categories

Find more on Block and Blockset Authoring in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!