필터 지우기
필터 지우기

Content of Live Scripts on Ubuntu keeps getting deleted

조회 수: 3 (최근 30일)
Riste Karashabanov
Riste Karashabanov 2021년 5월 4일
답변: Sai Sumanth Korthiwada 2022년 11월 1일
Hi everyone!
I'm using MatLab on Ubuntu. I am writing most of my reports on live scripts and exporting them as PDFs. Very often when I'm mid work, MatLab freezes for a second, and the editor of the live script goes gray (this doesn't happen to .m files). The only way I can see contents of the live script I'm working on is to close it from the editor, and open it again. However, when I open the file, it is blank, and all the progress I've done is lost.
I would really appriciate if there is a solution to this, and I am interested if somebody else has the same problem?
  댓글 수: 1
David Apolo
David Apolo 2021년 11월 10일
I have the exact same problem. Matlab 2020b running on Ubuntu 20.04 LTS

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2021년 11월 10일
Do you have some kind of cron job that is cleaning out the /tmp ?
Execution of Live Scripts involves extracting the matlab source code from the binary represention of the Live Script file, and then eval() the extracted MATLAB code. The files are extracted into a subdirectory of the MATLAB temporary directory that you can find using
tempdir()
For example at the moment on my Mac, the Livescript files go into /private/var/folders/vg/8pxp_0ps5lb0998xc85797tw0000gn/T/Editor_wlcib/ which is the Editor_wlcib subdirectory of what tempdir() shows
If something on your system is cleaning out the temporary directory, then you could have problems.

Sai Sumanth Korthiwada
Sai Sumanth Korthiwada 2022년 11월 1일
Hello Riste,
I understand that Live Editor is freezing in Ubuntu when exporting live scripts to PDFs.
The following workarounds could be useful when exporting:
  1. export/save to HTML rather than PDF. If PDF is required, then you can save/print the generated HTML to PDF.
  2. save the live script as a ‘.m’ file and then use the publish command to save to PDF.
This issue might be due to MATLAB not having sufficient memory available to perform the exports repeatedly.
You can also try removing 'clear' or 'close' commands in the Live Script, as these impact performance as well. For example, these functions:
>> clear all
>> close all
may cause performance issues if called repeatedly.
Hope this resolves your issue.

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by