フィルターのクリア

array of numbers to chars in separate cells

1 回表示 (過去 30 日間)
Tomas
Tomas 2012 年 4 月 30 日
Hi, I would like to know how to get separate cells with chars from number array:
from
F=[1 20 30 100];
to
E={'1','20','30','100'};

採用された回答

Honglei Chen
Honglei Chen 2012 年 4 月 30 日
E = cellfun(@num2str,mat2cell(F,1,ones(1,4)),'UniformOutput',false)

その他の回答 (2 件)

Honglei Chen
Honglei Chen 2012 年 4 月 30 日
E = mat2cell(F,1,ones(1,4)])

Tomas
Tomas 2012 年 4 月 30 日
OK, but i need those E values to be not in [ ], but in ' ', it means in char.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by