Azzera filtri
Azzera filtri

limiting standart deviation of a signal

2 visualizzazioni (ultimi 30 giorni)
Ase U
Ase U il 12 Lug 2018
Modificato: Adam Danz il 12 Lug 2018
Hi all,
i have a really easy question. I need std() command to limit. So i have a signal as name ST (on y axis) and time (on x axis) and time is from 0 to 10 seconds. But i need to find standart deviation of signal just between 0 to 3 seconds. You can see my graph.
I would be very appreciated for your answers. Thanks a lot!

Risposta accettata

Adam Danz
Adam Danz il 12 Lug 2018
Modificato: Adam Danz il 12 Lug 2018
Let's say your time variable is
time = 0:.1:10;
and your data is named 'data'.
First locate all time samples between 0 and 3 sec
idx = time >= 0 & time <= 3;
Then calculate std of your data for those times.
sig = std(data(idx));
This can be done all in 1 line like this
sig = std(data(time >= 0 & time <= 3));
*This assumes your 'time' and 'data' points correspond.

Più risposte (0)

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by