limiting standart deviation of a signal

2 次查看(过去 30 天)
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!

采纳的回答

Adam Danz
Adam Danz 2018-7-12
编辑:Adam Danz 2018-7-12
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by