Reading execel file with string.(giving NaN for data values like 10kA)

조회 수: 2 (최근 30일)
Gagan Bansal
Gagan Bansal 2019년 1월 30일
댓글: Gagan Bansal 2019년 1월 30일
I want to read a excel file in matlab.
my file is:
1ms 1kA 10V
2ms 2.2kA 3V
3ms 3.6kA 5.4V
using xls read it is giving
NaN NaN NaN
NaN NaN NaN
NaN NaN NaN
When I remove 'ms', 'kA' & 'V' fromthe excel. then xls can only read. How to solve this problem? How MATLAB can read it as a string?

채택된 답변

KSSV
KSSV 2019년 1월 30일
[num,txt,raw] = xlsread(youfile);
OR
T = readtable(yourfile) ;
  댓글 수: 1
Gagan Bansal
Gagan Bansal 2019년 1월 30일
Thanks for the answer.
I also want to remove the 'ms', 'kA' & 'V' from the matrix. Consider order or the matrix from the question.

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

추가 답변 (0개)

카테고리

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