exporting binary matrix to excel

조회 수: 3 (최근 30일)
Hafeez
Hafeez 2016년 12월 7일
댓글: Hafeez 2016년 12월 9일
Hi using dec2bin i have converted matrix into a binary vector, now i want to export the binary vector to excel, i am facing problem that all the bits of a particular element dont appear in the single cell,.e.g ,the
second element of the vector is 100, i want it to be stored as E1 in the picture, rather than it is stored by xlswrite command like the row 2. in three different cells, A2, B2 and C2

채택된 답변

Walter Roberson
Walter Roberson 2016년 12월 7일
Provided that YourMatrix is the output of dec2bin(), which is actually character rather than numeric, then:
xlswrite(TheFileNameGoesHere, cellstr(YourMatrix))
  댓글 수: 1
Hafeez
Hafeez 2016년 12월 9일
thank you Mr Walters for your kind support.

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

추가 답변 (1개)

Cyrus
Cyrus 2016년 12월 7일
편집: Cyrus 2016년 12월 7일
you can download and use this file: xlsappend.m
move the file in the same directory close to your matlab files and use it this way:
Matrix = rand([3, 10]);
[success,message] = xlsappend('a.xlsx', Matrix);
and you have to create the excel file before you run the code and file shouldn't be open.

카테고리

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