Is there a way to see the code within a Live Editor script (.mlx) without running the code?

72 views (last 30 days)
Hi, I have spent ages writing some code using Live Editor and at the last time I ran a section, it stalled. I forced quit Matlab and since then have been unable to open the script. I can see the top part of the script but then it says 'loading' and will not let me scroll down to see the rest of the code. An error box also pops up. Is there a way to open the script to copy and paste the code into a normal .m file? I am desperate not to loose the code as I'm new to MATLAB and it has taken me a long time to write it.

Answers (1)

Amy
Amy on 19 Dec 2017
Edited: Amy on 19 Dec 2017
Hi Christine,
I'm sorry to hear you're having this issue. Since the .mlx file format is an extension of the zip file format, you should be able to rename your .mlx file as a .zip file and then look at the metadata for the file (e.g. rename 'myLiveScript.mlx' to 'myLiveScript.zip'). In the zip archive, your code should be in a file called 'document.xml'. There's some additional information in this MATLAB Answers post.
Also - which version of MATLAB are you using? Do you have access to another version to see if you can open the live script in that version? Are you able to share the file that's causing this issue?

Categories

Find more on File Operations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!