필터 지우기
필터 지우기

double to string in a cell

조회 수: 35 (최근 30일)
Vincent I
Vincent I 2013년 6월 17일
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
Azzi Abdelmalek
Azzi Abdelmalek 2013년 6월 17일
your error message?
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