フィルターのクリア

Excel data to matlab

1 回表示 (過去 30 日間)
mahesh chathuranga
mahesh chathuranga 2013 年 9 月 16 日
コメント済み: George Wood 2016 年 3 月 8 日
I have excel sheet with 2 column,time and amplitude.But ,time values are in 13:25:55 format.but i couldn't import this data to matlab. error message"note that matlab numeric array can not contain strings".how to import this tipe of data to matlab.(This are GPS signal data.I want to create a signal)
13:06:35 -1.777
13:06:40 -1.934
13:06:45 -1.855
13:06:50 -1.855
13:06:55 -1.914
13:07:00 -1.855
13:07:05 -1.797
13:07:10 -1.719
13:07:15 -1.797
13:07:20 -1.699
13:07:25 -1.543
13:07:30 -1.602
13:07:35 -1.582
13:07:40 -1.68
13:07:45 -1.68
13:07:50 -1.738
13:07:55 -1.68
  1 件のコメント
Image Analyst
Image Analyst 2013 年 9 月 16 日

サインインしてコメントする。

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 9 月 16 日
[v,T,vT] = xlsread('filename1.xlsx')
temps=cell2mat(vT(:,1)) % time
temps=datestr(temps,'HH:MM:SS')
valeur=cell2mat(vT(:,2)) % your value
  2 件のコメント
mahesh chathuranga
mahesh chathuranga 2013 年 9 月 16 日
Thanks Mr.Azzi.your the man
George Wood
George Wood 2016 年 3 月 8 日
Thanks Mr. Azzi. I really appreciate your answer, very helpful.

サインインしてコメントする。

その他の回答 (1 件)

David Sanchez
David Sanchez 2013 年 9 月 16 日
Import your data as string using the sintax:
[num,txt] = xlsread(filename,sheet,range)
Once in Matlab, you can change the string to number.
Example:
x='10:23:34';
hour = str2num(x(1:2))
minute = str2num(x(4:5))
second = str2num(x(7:8))
Apply the code above to your needs

カテゴリ

Help Center および File ExchangeApplication Deployment についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by