MATLAB: Is there a way to fully display a symbolic answer that is truncated in the command window

command windowdisplaysymbolictruncated

I am trying to display a symbolic answer in the command window. However, the entire symbolic expression cannot be displayed. If I scroll to the far right of the command window, I get at the end of my symbolic answer:
… Output truncated. Text exceeds maximum line length of 25,000 characters for Command Window display.
Is there anyway I can view my entire symbolic answer without using the command window?

Best Answer

Hi Ben
The diary command can be used to save the outputs displayed in the command window to a text file. You can find the whole symbolic expression in the text file.
I would do something along the lines of:
>> diary ('myVariable.txt');
>> var1 % your symbolic variable
>> diary off
This will save the output displayed in the command window to the 'myVariable.txt' file.
More details regarding function diary can be found here
-Yu