array of numbers to chars in separate cells

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일

0 개 추천

E = cellfun(@num2str,mat2cell(F,1,ones(1,4)),'UniformOutput',false)

추가 답변 (2개)

Tomas
Tomas 2012년 4월 30일

0 개 추천

OK, but i need those E values to be not in [ ], but in ' ', it means in char.

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

질문:

2012년 4월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by