How can I measure the average of a signal at specified time points?

2 ビュー (過去 30 日間)
Simon Kalita-de Croft
Simon Kalita-de Croft 2019 年 7 月 19 日
コメント済み: Star Strider 2019 年 7 月 19 日
Hello
I'm sure this is a simple fix, but how can I measure the average of a signal at specified x points?
E.g. I want to measure the mean at 0 - 0.2 in the below exampe, and then again at 0.5-0.7
What code should I use please?
Thanks
Screen Shot 2019-07-19 at 10.02.50 pm.png

採用された回答

Star Strider
Star Strider 2019 年 7 月 19 日
Try this:
t = ...; % Time Vector
s = ...; % Signal Vector
t1 = t <= 0.2;
t2 = (t >= 0.5) & (t <= 0.7);
s1 = mean(s(t1));
s2 = mean(s(t2));
  3 件のコメント
Simon Kalita-de Croft
Simon Kalita-de Croft 2019 年 7 月 19 日
Actually I got it.
Thank you very much Star!
S
Star Strider
Star Strider 2019 年 7 月 19 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWaveform Generation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by