(stop) Wrapping output when publishing
조회 수: 7(최근 30일)
Hi, I am trying to stop matlab from wrapping a dataset when I publish the results, but cant seem to do it...
I have a dataset with 7 columns and a couple of rows, and in the editor I can display it like this:
Leg LegWeight PriceRatio TradeRatios RoundedTR RoundedPR IndexedByLeg1PR
'A' 1 0.49542 9.9085 10 0.5 1
'B' -1 -0.18005 -1.4404 -1 -0.125 -0.25
However when I publish the same code it splits the result into two seperate tables, like this:
Leg LegWeight PriceRatio TradeRatios RoundedTR
'A' 1 0.29853 5.0317 5
'B' -1 -0.49542 -9.9085 -10
Is there anyway to have the publish function do the same thing as the editor and not split my results?
Many thanks for your help.
Michael 2014년 8월 20일
It's been a while, so I'm not sure if you still are interested in this but I had the same issue so hopefully this will save others some time if they really need to do this.
I'm not sure how you would go about adjusting the width of the wrap setting, but if you want to disable it entirely here's what you can do.
Open up $matlabroot\toolbox\matlab\codetools\private\evalmxdom.m and search for 'EightyColumns'. You're going to want to comment out he following lines:
% For consistency, set the published output to 80 columns, regardless of
% the current Command Window width.
originalEightyColumns = feature('EightyColumns');
resetEightyColumnsObj = onCleanup(...
That should do it. There's more info on that feature function at Undocumented MATLAB .