MATLAB Problem with MATLAB. Text exceeds maximum length.

AI Thread Summary
MATLAB users are encountering a limitation where the Command Window cannot display outputs exceeding 25,000 characters, particularly when modeling complex polynomials. The issue arises when long outputs are attempted to be displayed directly in the Command Window. Suggestions include inserting new-line characters to break up the output or, more effectively, writing the results to a file instead of displaying them. This approach allows for the complete polynomial to be saved and reviewed without hitting the display limit. Utilizing file output is recommended as a practical solution to this problem.
AdityaNanda
Messages
6
Reaction score
0
I am using MATLAB to model gravity of an irregular body. While displaying the answer,however, MATLAB displays this message.

" Text exceeds maximum line length of 25,000 characters for Command Window display"

Is there any way to subvert this maximum length?

Thank You
 
Physics news on Phys.org
what exactly are you doing? when does this happen? are you outputing stuff to standard output (screen)? are you bothering to insert new-line characters every so often? have you try to NOT output to a Command Window and instead simply write to a file?
 
@gsal I wrote a m-file that returns a polynomial of x,y and z. On executing the m-file I get a polynomial that is very long(the length is not an error. it is expected). But the problem is that the returned polynomial is so long that the MATLAB window is unable to display the whole polynomial. A part is displayed . On horizontally scrolling to the end , I find the aforementioned message from matlab.

I wanted to know if it was possible ,somehow, to display the whole polynomial.
 
like I said, do not try to display in any way...see if you can just write to a file, instead.
 
Thanks a lot gsal..i will try that.
 

Similar threads

Back
Top