Live Editor with Matlab Functions in Simulink.

3 visualizaciones (últimos 30 días)
Patrick Wetherill
Patrick Wetherill el 19 de Feb. de 2019
Respondida: Walter Roberson el 20 de Feb. de 2019
Is it possible to use the Live Editor when writing a Matlab Function block in Simulink? It looks like I have to save a live editor .mlx file, then save that file also as a .m file which reformats the live editor benifits, then copy and paste that reduced version into the .slx file for the Simulink block. Am I missing something that would allow me to use the Live Editor on the .slx file directly?

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Feb. de 2019
No, it is not possible at this time.
Live Editor does not use simple text files like the main MATLAB editor does: a .mlx file is a zip'd directory containing a number of items including XML files.
MATLAB Function Blocks do not reference .m files. It is not simply a header block together with the name of a .m to invoke, so it is not a simple matter of changing to parsing to permit referencing .mlx files as well.
Instead, MATLAB Function Blocks store the code as one of the properties of the block, inside a XML file, with .slx files turning out to be a zip'd directory containing (mostly) XML files. The Simulink block structure itself would have to be altered to permit Live Editor code.
... This should not be interpreted as "It is not going to happen": this should be understood as "It has not happened as yet, and there are complications that make it tricky to implement, so it might take a while."

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by