Plot title with variables on single line
34 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Natasha
am 29 Mär. 2012
Bearbeitet: resh
am 23 Jul. 2017
I have the following line of code for a title on a plot:
title([IndexReturns.colheaders(1,k) '% move using' Days 'day rolling regression'])
But the title creates 4 seperate lines: 'variable, text, variable, text' instead of concatenating the text and variable values into a single line.
If I hardcode the title, it appears on 1 line.
Any ideas on how I remove the spacing?
Thanks in advance!
1 Kommentar
Akzeptierte Antwort
Jonathan Sullivan
am 29 Mär. 2012
My best guess if that IndexReturns.colheaders is a cell array. Try using curly brackets instead.
Example
title([IndexReturns.colheaders{1,k} '% move using' Days 'day rolling regression'])
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!