Why are there newline characters every thousand characters
4 次查看(过去 30 天)
显示 更早的评论
Why every thousand characters MATLAB automatically adds a newline character?
Example:
poly2sym(1:110)
will give me this output
ans =
x^109 + 2*x^108 + 3*x^107 + 4*x^106 + 5*x^105 + 6*x^104 + 7*x^103 + 8*x^102 + 9*x^101 + 10*x^100 + 11*x^99 + 12*x^98 + 13*x^97 + 14*x^96 + 15*x^95 + 16*x^94 + 17*x^93 + 18*x^92 + 19*x^91 + 20*x^90 + 21*x^89 + 22*x^88 + 23*x^87 + 24*x^86 + 25*x^85 + 26*x^84 + 27*x^83 + 28*x^82 + 29*x^81 + 30*x^80 + 31*x^79 + 32*x^78 + 33*x^77 + 34*x^76 + 35*x^75 + 36*x^74 + 37*x^73 + 38*x^72 + 39*x^71 + 40*x^70 + 41*x^69 + 42*x^68 + 43*x^67 + 44*x^66 + 45*x^65 + 46*x^64 + 47*x^63 + 48*x^62 + 49*x^61 + 50*x^60 + 51*x^59 + 52*x^58 + 53*x^57 + 54*x^56 + 55*x^55 + 56*x^54 + 57*x^53 + 58*x^52 + 59*x^51 + 60*x^50 + 61*x^49 + 62*x^48 + 63*x^47 + 64*x^46 + 65*x^45 + 66*x^44 + 67*x^43 + 68*x^42 + 69*x^41 + 70*x^40 + 71*x^39 + 72*x^38 + 73*x^37 + 74*x^36 + 75*x^35 + 76*x^34 + 77*x^33 + 78*x^32 + 79*x^31 + 80*x^30 + 81*x^29 + 82*x^28 + 83*x^27 + 84*x^26 + 85*x^25 + 86*x^24 + 87*x^23 + 88*x^22 + 89*x^21 + 90*x^20 + 91*x^19 + 92*x^18 + 93*x^17 + 94*x^16 + 95*x^15 + 96*x^14 + 97*x^13 + 98*x^12 + 99*x^11 + 100*x^10 +\\\n 101*x^9 + 102*x^8 + 103*x^7 + 104*x^6 + 105*x^5 + 106*x^4 + 107*x^3 + 108*x^2 + 109*x + 110
in particular, at the 1000th character, there is
... + 100*x^10 +\\\n 101*x^9 + ...
I tried to replicate the problem on two other computers (with Windows 10 and Linux Mint 18), but it won't appear. Why is that?
If it can help, my configuration is
OS: Arch Linux WM: awesome MATLAB: 2017a (academic)
0 个评论
采纳的回答
Walter Roberson
2017-5-7
This is a bug in the Symbolic Toolbox. See https://www.mathworks.com/matlabcentral/answers/337896-odd-r-n-output-from-symbolic-multiplication#answer_265002
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!