How do I go between plain scripts (.m) and live scripts (.mlx)?

373 次查看(过去 30 天)
I would like to convert my Live Editor files to ordinary script files and vice versa, how do I do that?

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2023-1-20
Use the following following conversion steps:
  • Plain to Live: “Open as Live Script” from Current Folder Browser or document tab
  • Live to Plain: “Save as…” and select “MATLAB Code (*.m)” Please also note that in MATLAB R2022a 'export' was introduced to go from MLX to M: https://mathworks.com/help/matlab/ref/export.html
  2 个评论
Baptiste Ottino
Baptiste Ottino 2017-8-7
Hi John, Hi Sarang,
It is perfectly possible to go between the two formats using the following internal functions (2016b, maybe even 2016a):
From mlx to m:
doc matlab.internal.richeditor.openAndConvert
From m to mlx:
doc matlab.internal.richeditor.openAndSave
I know I'm late on the topic, but I found out by pure luck after countless hours of research, and I hope it will help someone. Best regards.

请先登录,再进行评论。

更多回答(1 个)

Baptiste Ottino
Baptiste Ottino 2017-8-7
Alternatively, use the command lines:
From mlx to m:
doc matlab.internal.richeditor.openAndConvert
From m to mlx:
doc matlab.internal.richeditor.openAndSave

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by