Effacer les filtres
Effacer les filtres

Text box with a variable on one line

9 vues (au cours des 30 derniers jours)
Emily
Emily le 18 Août 2014
Commenté : Emily le 18 Août 2014
I'm new to matlab (formerly used LabView) I am trying to create a text box for a graph using a variable TimeStep defined above using the code below. How can I get this to appear on one line (tried strjoin but didn't get anywhere) instead of starting a new line at TimeStep and 'min means'
annotation(figure1,'textbox',[0.153 0.817 0.183 0.0815,],'String',{('Error bars are ± one standard deviation on'; num2str(TimeStep);'min means'},'FitBoxToText', 'on', 'FontSize',12,'FontName', 'Calibri')
Thanks

Réponses (1)

Adam
Adam le 18 Août 2014
Using ; within a { } block will force a new line so try removing those and just concatenating in a [ ] block instead.
  1 commentaire
Emily
Emily le 18 Août 2014
working now great thanks

Connectez-vous pour commenter.

Catégories

En savoir plus sur Characters and Strings 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!

Translated by