Problem with MATLAB. Text exceeds maximum length.

Click For Summary

Discussion Overview

The discussion revolves around a problem encountered in MATLAB related to displaying a long polynomial output in the Command Window, specifically the error message indicating that the text exceeds the maximum line length of 25,000 characters. Participants explore potential solutions and alternative approaches to handle this issue.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes using MATLAB to model gravity of an irregular body and encounters a limitation when trying to display a long polynomial output.
  • Another participant questions the specifics of the output process, asking whether the output is directed to the Command Window and suggesting the use of new-line characters to manage the display.
  • A participant clarifies that the polynomial generated is expected to be long and expresses the desire to find a way to display the entire polynomial in the Command Window.
  • One participant reiterates the suggestion to avoid displaying the output in the Command Window and instead write the output to a file.
  • A later reply acknowledges the suggestion and indicates intent to try writing to a file.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a specific solution, but there is agreement on the suggestion to write the output to a file as a potential workaround.

Contextual Notes

Participants have not resolved the limitations of the Command Window display and the implications of outputting long text in MATLAB.

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

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K