How to calculate the difference of means?

13 ビュー (過去 30 日間)
Sameer
Sameer 2015 年 10 月 12 日
コメント済み: Sameer 2015 年 10 月 13 日
Hello all,
I have a signal and from that signal I want to calculate the difference of means i.e mean of vaues from time step X to Y minus the mean of values from time step 1 to X-1. And it should do it continously as my simulation runs for Infinite time.
It would be great if you guys can suggest some ways or methods through which I can achieve my goal.
Thanking you in anticipation!
Regards

回答 (1 件)

Thorsten
Thorsten 2015 年 10 月 12 日
mean(data(x:y)) - mean(data(1:x-1))
  1 件のコメント
Sameer
Sameer 2015 年 10 月 13 日
Thanks a lot for replying. But I guess I was not crystal clear in my question. Let me allow to explain the situation.
I am getting a signal as input in my simulink model, now what I have to do is to calculate the differnce of means of that signal in the following manner:
now my challange is to collect the signal values for lets say 100 steps and then calculate the mean from 50 to 100 steps as well as the mean from 1 to 50 step.
Hoping to hear from you.
Regards

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

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by