need to convert a cell into a vector number

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 Comments

I tried, by i get
Stephen23
Stephen23 on 29 Apr 2022
Edited: Stephen23 on 29 Apr 2022
STR2DOUBLE interprets commas as a thousands grouping character, as is commonly used in English. Thus it will convert that text into one integer.

Sign in to comment.

 Accepted Answer

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

More Answers (0)

Categories

Asked:

on 29 Apr 2022

Commented:

on 29 Apr 2022

Community Treasure Hunt

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

Start Hunting!