Is it possible to programmatically run and export a live function in MATLAB Version R2020a? I know in version 2022 you can use the export function.
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joe Lettieri
am 7 Jun. 2022
Bearbeitet: Stefanie Schwarz
am 20 Sep. 2024
I know that in Matlab 2022, you can use the function
export("MyLiveScript.mlx");
to export a Live Script or Function. But this doesn't work in Version 2020. Is there any work around, other than just clicking the menu bar?
0 Kommentare
Akzeptierte Antwort
Chandrika
am 9 Jun. 2022
As per my understanding, you want to programatically execute and export a livescript. For MATLAB version R2020a, please look at the following commands as a possible workaround solution to run and export live function- MyLiveScript.mlx
mlxloc = fullfile(pwd,'\MyLiveScript.mlx');
fileout = fullfile(pwd,'\test.docx');
matlab.internal.liveeditor.executeAndSave(mlxloc);
matlab.internal.liveeditor.openAndConvert(mlxloc,fileout);
It shall convert the live script to a docx file and save it in the current folder. To save the output file, you can here use file extensions as per your convenience.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!