How to get the value (number) that is in a string?

2 visualizaciones (últimos 30 días)
Zineb EL MORCHID
Zineb EL MORCHID el 6 de Abr. de 2016
Comentada: Zineb EL MORCHID el 6 de Abr. de 2016
To lighten my question ,for exemple let's take d='1'; I want to increment 1 it to get 2 as result. So I tried to convert it to double by using double(d)+1; I got 50. Obviously '1' is 49 in double , same thing I got by using int8 . which function should I use to get 2 as result?

Respuesta aceptada

Image Analyst
Image Analyst el 6 de Abr. de 2016
Like this:
doubleD = str2double(d);

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion 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