Reputation: 125
How can I wrap text in Matlab Command Windows? How Can I know the command windows width/size so I can write a function to wrap up my text.
Upvotes: 0
Views: 1073
Reputation: 1205
As Suever pointed out, you can do get(0,'CommandWindowSize)
to get the dimensions of the command window. There's an option to enable wrapping of the command window, which I believe satisfies what you're trying to do.
Upvotes: 1
Reputation: 65430
You can get the current width of the command window by using the CommandWindowSize
property of the graphics root object.
sz = get(0, 'CommandWindowSize');
% 80 25
The first value in this matrix is the number of columns and the second number is the number of rows.
After knowing this size, you can then either write your own wrapping function or use the second one that Mikhail_Sam linked to.
Upvotes: 0
Reputation: 11218
There is no built in functions for this. But I interested in your question and found some workarounds about this:
Position: Set/get position relative to monitor
options. I want to add, that I'm not the author of this functions! Just found it!
Upvotes: 0