How to convert a '40*1 double' variable into '40*1 cell' variable?

5 vues (au cours des 30 derniers jours)
SYED AQEEL HAIDER
SYED AQEEL HAIDER le 27 Jan 2018
Commenté : Star Strider le 29 Jan 2018
I have to append a new data column into my existing excel sheet. when I tried the method given on matlab answers, I am facing this problem. I have created a 40*1 double variable because data read from my excel sheet is of 40*1 cell. But concatenation fails with error message 'Error using horzcat Dimensions of matrices being concatenated are not consistent.'
  2 commentaires
Jan
Jan le 28 Jan 2018
I do not know, what "when I tried the method given on matlab answers" exactly means. Please post the code. Otherwise " concatenation fails" could have a variety of reasons.
SYED AQEEL HAIDER
SYED AQEEL HAIDER le 29 Jan 2018
Modifié(e) : Stephen23 le 29 Jan 2018

Connectez-vous pour commenter.

Réponse acceptée

Star Strider
Star Strider le 27 Jan 2018
I would use the num2cell (link) function.

Plus de réponses (1)

SYED AQEEL HAIDER
SYED AQEEL HAIDER le 29 Jan 2018
Thanks Star Strider
  1 commentaire
Star Strider
Star Strider le 29 Jan 2018
My pleasure.
If my Answer helped you solve your problem, please Accept it!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Import from MATLAB 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