Ironically the website has word wrapped my question as well! The first result displays a single table of 7 columns and 2 rows (+headers).
(stop) Wrapping output when publishing
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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:
disp(spread)
Result
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
RoundedPR IndexedByLeg1PR
0.29665 1
-0.5 -1.6855
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.
Réponses (1)
Michael
le 20 Août 2014
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:
Lines 69-72:
% For consistency, set the published output to 80 columns, regardless of
% the current Command Window width.
originalEightyColumns = feature('EightyColumns');
resetEightyColumnsObj = onCleanup(...
@()feature('EightyColumns',originalEightyColumns) );
feature('EightyColumns',1)
Line 100:
delete(resetEightyColumnsObj);
0 commentaires
Voir également
Catégories
En savoir plus sur Language Fundamentals dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!