Borrar filtros
Borrar filtros

need to convert a cell into a vector number

2 visualizaciones (últimos 30 días)
Pas182
Pas182 el 29 de Abr. de 2022
Comentada: Pas182 el 29 de Abr. de 2022
Hello everyone,
I need to convert a 1*1 cell into a vector array, below an example:
from this :
to this:
Which is the easiest way to do it?
Thank you so much in advcance! :)
  3 comentarios
Pas182
Pas182 el 29 de Abr. de 2022
I tried, by i get
Stephen23
Stephen23 el 29 de Abr. de 2022
Editada: Stephen23 el 29 de Abr. de 2022
STR2DOUBLE interprets commas as a thousands grouping character, as is commonly used in English. Thus it will convert that text into one integer.

Iniciar sesión para comentar.

Respuesta aceptada

Stephen23
Stephen23 el 29 de Abr. de 2022
C = {'80,47,109,44,104,40'} % why is this in a scalar cell array?
C = 1×1 cell array
{'80,47,109,44,104,40'}
V = sscanf(C{:},'%f,',[1,Inf])
V = 1×6
80 47 109 44 104 40

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by