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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!