Change content of Simulink Matlab Function block through console

First time Matlab Function block is created, it is populated with the following default implementation (one can use the editor to view and change it):
function y = fcn(u)
y = u;
Is there a way to use smth like get_param() and set_param() to change the content of this block? (I need to be able to modify function through console instead of Editor)

Antworten (1)

Paul
Paul am 3 Okt. 2023

0 Stimmen

Use MATLABFunctionConfiguration and modify the FunctionScript property.

2 Kommentare

Hey Paul,
Thanks for the reply. That is indeed the option that could work, but due to libraries compatibility, we are using Matlab 2018b. Do you have a solution for older Matlab version?
No, I'm afraid not.

Melden Sie sich an, um zu kommentieren.

Kategorien

Produkte

Gefragt:

am 3 Okt. 2023

Kommentiert:

am 3 Okt. 2023

Community Treasure Hunt

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

Start Hunting!

Translated by