Filter löschen
Filter löschen

Import multiple functions to Simulink

2 Ansichten (letzte 30 Tage)
Adham Elkhouly
Adham Elkhouly am 14 Okt. 2022
Kommentiert: Adham Elkhouly am 14 Okt. 2022
I would like to import multiple functions that I used in my workspace to simulink via the simin block.
Assume the functions are
y = x^2+x^4+3x+3
z = 3*y^2+x^6;
they were defined as follows
syms y x z
y = x^2+x^4+3x+3;
z = 3*y^2+x^6;
I want to use them in simulink, but I beleive they must be non-infinite values. How can I import their values, for instance, from 1 to 10 only?
TIA

Antworten (1)

Walter Roberson
Walter Roberson am 14 Okt. 2022
You cannot import those into Simulink. Those are not functions, those are symbolic expressions, but nothing in the symbolic toolbox is supported in Simulink.
  3 Kommentare
Walter Roberson
Walter Roberson am 14 Okt. 2022
More "elegant" might be to use matlabFunction writing to a file and calling the file from a MATLAB function block.
Adham Elkhouly
Adham Elkhouly am 14 Okt. 2022
Thank you for suggesting a more "elegant" way

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Model Editing finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by