How do you generate data at different sampling rates?

1 Ansicht (letzte 30 Tage)
karen
karen am 11 Jun. 2013
Hello. I know how to generate data using the function Randi but I don't know how to run, lets say, three data sets all sampling at different times.

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 11 Jun. 2013
Define your time vector
ts1=0.1;
ts2=0.01;
t1=0:ts1:10*ts1;
t2=max(t1)+ts2:ts2:max(t1)+10*ts2;
t=[t1 t2]
% Then generate your vector y
y=randi(numel(t),1,numel(t))
plot(t,y)
  3 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 11 Jun. 2013
Why tic function?
karen
karen am 11 Jun. 2013
It was out of curiosity.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by