double to string in a cell

Hi, is there an easier way to convert from double to string in a cell?
Thank you
Left = {num2str(variable1)
num2str(variable2)
num2str(variable3)
etc...}
set(handles.Left_Listbox,'String',Left)

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 6월 17일
편집: Azzi Abdelmalek 2013년 6월 17일

0 개 추천

A={1 2 12 25}
B=cellfun(@num2str,A,'un',0)

댓글 수: 4

Doesnt work. Probably has something to do with variable Left which looks like this:
Left = [ 0 ]
[ 1 ]
[ 1 ]
etc
nvm
B = cellfun(@num2str,Left,'UniformOutput',false)
Azzi Abdelmalek
Azzi Abdelmalek 2013년 6월 17일
your error message?
I got it thank you by doing the following:
B = cellfun(@num2str,Left,'UniformOutput',false)

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

추가 답변 (1개)

Evan
Evan 2013년 6월 17일
편집: Evan 2013년 6월 17일

0 개 추천

help cellfun

카테고리

도움말 센터File Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by