double to string in a cell

21 次查看(过去 30 天)
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
A={1 2 12 25}
B=cellfun(@num2str,A,'un',0)
  4 个评论
Vincent I
Vincent I 2013-6-17
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

类别

Help CenterFile 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