Effacer les filtres
Effacer les filtres

double to string in a cell

35 vues (au cours des 30 derniers jours)
Vincent I
Vincent I le 17 Juin 2013
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)

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 17 Juin 2013
Modifié(e) : Azzi Abdelmalek le 17 Juin 2013
A={1 2 12 25}
B=cellfun(@num2str,A,'un',0)
  4 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 17 Juin 2013
your error message?
Vincent I
Vincent I le 17 Juin 2013
I got it thank you by doing the following:
B = cellfun(@num2str,Left,'UniformOutput',false)

Connectez-vous pour commenter.

Plus de réponses (1)

Evan
Evan le 17 Juin 2013
Modifié(e) : Evan le 17 Juin 2013

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by