Effacer les filtres
Effacer les filtres

plot title

2 vues (au cours des 30 derniers jours)
Baba
Baba le 17 Nov 2011
I have a plot title that pulls text data out of a struct, text is AB-1, AC-2 ....
[title]=structure(i),name;
....
title(title, 'Interpreter','non')
so only AB-1 ... shows up in the title.
I'd like to add a few other things from a number array called time. Start and end numbers.
So that the teitle would read 'AB-1 somestarttime-endtime'
I have : [start]=time(1); [finish]=time(end);
however,
title(title,start,finish,'Interpreter','non');
does not work, " incorrect numbeqr of input arguments'

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 17 Nov 2011
"title" is a function so don't use it for variable name.
title() needs a string input so all you need to do is to concatenate your numbers together into a string. You may need to use num2str() or sprintf().

Plus de réponses (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by