How do export data from a frest.Sinestream function

조회 수: 1 (최근 30일)
Philip
Philip 2017년 4월 4일
답변: Vandana Ravichandran 2017년 4월 12일
I am trying to export data from the input = frest.Sinestream. I have used ts = generateTimeseries(input) but it changes the sample rate from the original frest.Sinestream data. Plus I can not export the time column when using y=ts.data. Is there a way to directly export the frest.Sinestream data with time?

채택된 답변

Vandana Ravichandran
Vandana Ravichandran 2017년 4월 12일
generateTimeseries does not change the sample rate with reference to the original Sinestream input. For e.g. I tried the following:
>> input = frest.Sinestream('Amplitude',1e-3,'Frequency',logspace(1,3,50),...
'SamplesPerPeriod',10,'FreqUnits','Hz');
>> ts = generateTimeseries(input);
>> figure;
>> plot(input);
>> figure;
>> plot(ts);
Both the figures look exactly the same. Also, the following commands work fine in MATLAB:
>> y = ts.data;
>> x = ts.time;
Also you can use "dlmwrite" function if you want to export timeseries data to a file:
>> dlmwrite('test',[ts.time ts.data]);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time Series에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by