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

조회 수: 1 (최근 30일)
SYED AQEEL HAIDER
SYED AQEEL HAIDER 2018년 1월 27일
댓글: Star Strider 2018년 1월 29일
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
Jan
Jan 2018년 1월 28일
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.

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

채택된 답변

Star Strider
Star Strider 2018년 1월 27일
I would use the num2cell (link) function.

추가 답변 (1개)

SYED AQEEL HAIDER
SYED AQEEL HAIDER 2018년 1월 29일
Thanks Star Strider
  댓글 수: 1
Star Strider
Star Strider 2018년 1월 29일
My pleasure.
If my Answer helped you solve your problem, please Accept it!

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by