Extract string form cell for sprintf

1 visualización (últimos 30 días)
Jamie Shelley
Jamie Shelley el 21 de Jul. de 2016
Comentada: Jamie Shelley el 21 de Jul. de 2016
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

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 21 de Jul. de 2016
Editada: Azzi Abdelmalek el 21 de Jul. de 2016
Example
a={'abc'}
use
sprintf([a{1} '%d'],5)
  2 comentarios
Jamie Shelley
Jamie Shelley el 21 de Jul. de 2016
Thanks, but I don't really understand the example so I can't make mine work - what does the 5 represent please? I just can't really get my head around the format of it to be able to adapt it to mine
Jamie Shelley
Jamie Shelley el 21 de Jul. de 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!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by