Excel import single '
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi! Im trying to load an excel sheet using function xlsread. Some of its cells look like this: ‘900/8
i.e. with one single ‘ in the beginning. Nothing is loaded from these cells. Id prefer to fix this in Matlab using some other loading command. If its not possible, can I save my excel file in a smart format enabling loading of these cells. If that’s also impossible, can I remove the single ‘ in some way in Excel?
Thanx for your help, Simon
댓글 수: 0
답변 (1개)
Oleg Komarov
2011년 9월 6일
So if you have an excel that look like this:
'900/8 30 20
'600/7 10 30
[num,txt] = xlsread(...);
Look at txt, your data is imported as class char and is stored in a cell array of strings. You have to convert them back to numeric class with:
댓글 수: 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!