wrap text with disp.
6 次查看(过去 30 天)
显示 更早的评论
The error command wraps text to fit the width of the command window, but disp does not. I know I can put in hard-wired new lines with disp, but I do not want to assume that a user's command window is N characters wide. Is there a way to let text fit the command window dynamically as it does with error?
6 个评论
per isakson
2014-8-18
With R2013a,64bit,Win7 your example outputs one long line. No word wrap here either. (And no warning or error message.)
dpb
2014-8-18
No joy w/ R2012b on XP, either. Interestingly enough,
>> com.mathworks.services.Prefs.getBooleanPref('CommandWindowWrapLines')
ans =
0
>> com.mathworks.services.Prefs.setBooleanPref('CommandWindowWrapLines',1)
>> com.mathworks.services.Prefs.getBooleanPref('CommandWindowWrapLines')
ans =
1
>>
Does make it appear there is such a option but whatever it does, disp "knows nuthnk!" about it...
采纳的回答
更多回答(1 个)
dpb
2014-8-18
Seems like reasonable enhancement request -- mayhaps TMW official support can suggest a workaround meanwhile.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!