Extract string form cell for sprintf

2 views (last 30 days)
I have a string saved in a cell on excel, that I need to put onto my GUI using sprintf, but it says sprintf doesn't accept cell inputs, is there a way of extracting it from the cell and turning it into a string please? Thanks

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 21 Jul 2016
Edited: Azzi Abdelmalek on 21 Jul 2016
Example
a={'abc'}
use
sprintf([a{1} '%d'],5)
  2 Comments
Jamie Shelley
Jamie Shelley on 21 Jul 2016
Actually I found a way around it using something similar to what you suggested (although I don't really undertsand the example still, but it gave me an idea that worked), Thank you!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!