How can I display a wide matrix in the MATLAB Command Window without the rows being wrapped?

I would like to be able to display a wide matrix in the MATLAB Command Window without the rows being wrapped.

 Accepted Answer

The number of columns that are displayed per row are determined automatically according to the width of the MATLAB Command Window. The ability to change this behavior programmatically is not available in MATLAB.
To work around this issue, use the NUM2STR function as follows:
num2str(magic(20))
In order for this to work, you will need to uncheck the option "Wrap lines", located under the menu File -> Preferences -> Command Window.

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!