Can MATLAB Fcn block output a bus?

2 visualizzazioni (ultimi 30 giorni)
Daniel
Daniel il 4 Feb 2011
I'm trying to use MATLAB Fcn block to output a bus. I can't use an Embedded MATLAB Fcn block for reasons that I would rather not get into now.
Does anyone knows how to do this?
  1 Commento
Arnaud Miege
Arnaud Miege il 4 Feb 2011
I don't know your reasons for not wanting to use an Embedded MATLAB function block, but that would be my recommendation. It can output a bus and because it uses code generation, is very efficient. A MATLAB Fcn block, on the other hand, calls the MATLAB parser during each integration step and therefore is very inefficient. I would avoid using it if at all possible.

Accedi per commentare.

Risposta accettata

Davide Ferraro
Davide Ferraro il 4 Feb 2011
The MATLAB function block is not able to create a bus.
We strongly suggest the use of the Embedded MATLAB function that allows better performances and code flexibility. If you can express your doubts regarding the use of the Embedded MATLAB function we may provide you further assistance.
This command allows you to use any function (not necessarily from Embedded MATLAB subset). This reduces the performance (and is not working for code generation) but allows you to use all MATLAB features.

Più risposte (1)

Daniel
Daniel il 5 Feb 2011
Thanks for the response! I came to the same conclusion and used eml.extrinsic command. Although from your answer it seems that I can't use it for my application. The simulink code i'm working on essential goes into an embedded target.

Categorie

Scopri di più su Simulink Functions in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by