How to import the data from an excel file to a timeseries object?

5 Ansichten (letzte 30 Tage)
Chun Teng
Chun Teng am 5 Okt. 2016
Kommentiert: KSSV am 5 Okt. 2016
I got a sequence from an excel file and want to import it into a timeseries object. But the problem is, after I assign a sequence into the object, the values are varied and different from the original ones. These are my codes below and the raw data attached:
RawSin = xlsread(path,'D6:B50006');
time = RawSin(:,1);
data = RawSin(:,2);
Ts_RawSin = timeseries(time,data);
Could someone explain why this happened? I will really appreciate it!

Akzeptierte Antwort

KSSV
KSSV am 5 Okt. 2016
data = xlsread('sinC1mr100000.xlsx') ;
%
data1 = data(6:end,1:2) ; % first series
data2 = data(6:end,4:5) ; % second series
plot(data1(:,1),data1(:,2)) ;
hold on
plot(data2(:,1),data2(:,2));

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by