필터 지우기
필터 지우기

need to convert a cell into a vector number

조회 수: 2 (최근 30일)
Pas182
Pas182 2022년 4월 29일
댓글: Pas182 2022년 4월 29일
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
Pas182
Pas182 2022년 4월 29일
I tried, by i get
Stephen23
Stephen23 2022년 4월 29일
편집: Stephen23 2022년 4월 29일
STR2DOUBLE interprets commas as a thousands grouping character, as is commonly used in English. Thus it will convert that text into one integer.

댓글을 달려면 로그인하십시오.

채택된 답변

Stephen23
Stephen23 2022년 4월 29일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by