フィルターのクリア

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
  1 件のコメント
Pas182
Pas182 2022 年 4 月 29 日
it works!!! thank you so much!! :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by