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 Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by