writing a string

2 vues (au cours des 30 derniers jours)
joseph Frank
joseph Frank le 3 Juil 2011
A=3; B=17; how can I write a string: 'Panel A: range(3-17)'?

Réponse acceptée

the cyclist
the cyclist le 3 Juil 2011
['Panel A: range(',num2str(A)','-',num2str(B),')']

Plus de réponses (1)

per isakson
per isakson le 3 Juil 2011
I prefer
sprintf( 'Panel A: range(%u-%u)', A, B )
because I make fewer mistakes using that style
- per

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by