Clear Filters
Clear Filters

How to store large samples of time series data in MATLAB?

1 view (last 30 days)
Hi all, I am trying to store about 100 random samples of the following equations.
y(t) = µ + r(t)σ;
y(t) = µ + r(t)σ + a sin(2πt/T);
y(t) = µ + r(t)σ - gt;
Where
σ=5
y(t)=time series value
t=time
µ=mean value
a= amplitude of cycle variations
g= Magnitude of gradient trend
T= Period of cycle
The randomly distributed number is r(.).
Essentially, I'm trying to generate a lot of samples so that I can test the samples with various neural network time-series classifiers. My question is.. how do I create this data in MATLAB?

Answers (1)

Walter Roberson
Walter Roberson on 6 Jun 2017
given a vector of times t,
ts1 = timeseries( mu + rand(size(t)) * sigma, t);
ts2 = timeseries( mu + rand(size(t)) * sigma + a * sin(2*pi*t/T), t);
ts3 = timeseries( mu + rand(size(t)) * sigma - g * t, t);

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!