Live Editor long display output bug. Command to remove output from Live Script?
조회 수: 7 (최근 30일)
이전 댓글 표시
I bug I recently encountered corrupted my Live Script so it was not openable. Using symbolic methods, I had generated a formula apparently exceeding the 63k character limit for display in a Live Script. The Script crashed with a cyptic error and when I tried to open it, MATLAB simply hung with a blank Live Editor frame. The 'Clear All Output' option was greyed out like other Live Editor Tools.
Suspecting Live Editor was trying fruitlessly to render output, I searched the interweb and MathWorks for a command line commmand to clear output and found none so resorted to my trick of prying the .mlx open with BBEdit, opening the output file which was, er, lengthy, selecting all, deleting, and saving, wondering if I would damage the mlx, but it worked. Anyway, it would be great if there was a command to do this from the command line. Anyone one know of one? I built my own workaround below. Of course it would be great if display() had a character limit check like this and better if it provided arguments to customize how to handle large outputs, e.g. redirect to a file as oposed to trying to display and in the Live Script case render.
function Symdisplay=Symdisplay(symbolicinput)
if length(char(symbolicinput))>5000
SymDisplay="Too long to display"
else
Change display to disp to not show the name of the variable being displayed.
display(symbolicinput);
end
end
댓글 수: 0
답변 (1개)
Steven Lord
2024년 5월 7일
Please send the Live Script with which you were able to reproduce this error to Technical Support directly using this link so that the Support staff and the development staff can investigate this bug.
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!