writing a string

A=3; B=17; how can I write a string: 'Panel A: range(3-17)'?

 Accepted Answer

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

More Answers (1)

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

Categories

Tags

Community Treasure Hunt

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

Start Hunting!