live script when result is very long

조회 수: 4 (최근 30일)
Yi Mao
Yi Mao 2016년 12월 19일
댓글: Davide Bassignana 2017년 11월 22일
When I use the disp function in live script, when the result is very long, the output file (either pdf or html) won't be able to show the result correctly(not fit in one line, since there is no scroll bar). Is this a bug that Matlab does not auto shrink the result size to fit or is there some way to set the font size for disp function when in live script?
  댓글 수: 2
Adam
Adam 2016년 12월 19일
Can you not just split it over multiple lines? Reducing the font size is not all that practical in a generic case where it may have to become infeasibly small to fit a whole line on.
Davide Bassignana
Davide Bassignana 2017년 11월 22일
How can you split an output on multiple lines ? Or even use fprintf ? I have the very same problem, my live script has a very long symbolic output function and it doesn't fit the pdf page when exporting.

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

답변 (1개)

Isabella Osetinsky-Tzidaki
Isabella Osetinsky-Tzidaki 2016년 12월 19일
have you tried "xlswrite" command?
Just like this:
% instead of disp('X')
xlswrite('MyFile.xlsx','X')
  댓글 수: 2
Yi Mao
Yi Mao 2016년 12월 19일
No. But what does it have to do with excel file? I'm just trying display a long symbolic expression, and want to have it correctly in pdf format.
Yi Mao
Yi Mao 2016년 12월 19일
By the way, writing the result to a separate file is not my intention. I want things to work in a similar way as publish .m file.

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

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by