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.
SYED AQEEL HAIDER
SYED AQEEL HAIDER 2018 年 1 月 29 日
編集済み: Stephen23 2018 年 1 月 29 日

サインインしてコメントする。

採用された回答

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 Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by