How can I obtain char matrix from excel?
조회 수: 6 (최근 30일)
이전 댓글 표시
Hi everybody,
I have a excel file (216x1) and I convert to it a char matrix (216x1). How can I do it?
I presented my excel file in attachment.
댓글 수: 0
채택된 답변
Voss
2023년 11월 20일
filename = 'S5_origin.xlsx';
In R2015a, you can try using readtable to generate a table. Note the resulting table has 215 rows, since the first row of the file was interpreted as the variable name.
T = readtable(filename)
I'm not sure what readtable options were available in R2015a to try to change how the file was interpreted, so if readtable doesn't work or the result is not to your liking, you can use xlsread to generate a cell array of char vectors:
[~,~,c] = xlsread(filename) % c is a cell array of char vectors (216x1)
I don't think you really want a 216x1 char matrix.
댓글 수: 4
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
