Excelの1つのセ​ルに「char型の文​字列」を格納する方法​について

10 views (last 30 days)
Shouhei Ookouchi
Shouhei Ookouchi on 27 Jul 2020
Commented: Shouhei Ookouchi on 27 Jul 2020
添付したファイル「Excelwritetest.m」を実行しましたが、質問資料.pdfの図1の様な実行結果となりました。
質問資料.pdfの図2の様に「MATLABを用いて、Excelの1つのセルにchar型の文字を複数個格納すること」は可能でしょうか。
初歩的な質問で申し訳ございませんが、よろしくお願いします。

Accepted Answer

michio
michio on 27 Jul 2020
R2020a で添付のスクリプト試したのですが、図2のように保存されておりました。
A = 12345;
B = dec2hex(A);
C = mat2cell(B,ones(size(B,1),1));
writecell(C,'mfilewrite.csv')
キャプチャー画像は以下。
  1 Comment
Shouhei Ookouchi
Shouhei Ookouchi on 27 Jul 2020
普段ファイルを保存している場所とは別のフォルダに作成されていた様で見落としていました。 ご指摘ありがとうございました。

Sign in to comment.

More Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!