Remove quotation sign from values in cell

I have a 730x1 cell looking like this:
'1.3'
'1.0'
'0.2'
'0.9'
'-0.4'
'-1.0'
>> u{1}
ans =
'1.3'
How do I remove the quotation signs?

1 comentario

Stephen23
Stephen23 el 11 de Abr. de 2023
Editada: Stephen23 el 11 de Abr. de 2023
"How do I remove the quotation signs?"
You can't, because they are not there. They are just an artifact of how character arrays are displayed.
And just to make it clear, Star Strider's answer does not "remove" any quotation signs from text data, it actually converts text data into numeric (just as the STR2DOUBLE documentation explains).

Iniciar sesión para comentar.

 Respuesta aceptada

Star Strider
Star Strider el 6 de Abr. de 2023

1 voto

Without knowing more, see if the str2double funciton will do what you want.

2 comentarios

Joel
Joel el 11 de Abr. de 2023
Perfect, thank you
Star Strider
Star Strider el 11 de Abr. de 2023
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Versión

R2023a

Preguntada:

el 6 de Abr. de 2023

Editada:

el 11 de Abr. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by