I need to integrate the folowing integral: 1/T * integral x^2(tau) dtau [t+T/2, t-T/2]

6 ビュー (過去 30 日間)
navid jafari
navid jafari 2022 年 7 月 25 日
コメント済み: Walter Roberson 2022 年 7 月 26 日
hi, guys
I need to integrate the folowing integral:
1/T * integral x^2(tau) dtau [t+T/2, t-T/2]
tau should be chosen from user, we can choose 1 sec.
x=Discrete data, with dt=0.005
T=Short time interval.
Thank you if you help me
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2022 年 7 月 25 日
How does this related to MATLAB? Is it an assignment? Then show your code/what you have tried and tell what problem/error you are facing.
Also, tau is the variable of integration, how can it assume a value? Maybe format your formula properly, it is still a bit ambiguous.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 7 月 25 日
syms T t tau x
result = 1/T * int(x^2 * tau, tau, t-T/2, t+T/2)
result = 
tau should be chosen from user
No, that is inconsistent with you integrating with respect to tau (the dtau in your expression) . The variable of integration cannot have a value chosen by the user.
Perhaps t is being chosen by the user?
x=Discrete data, with dt=0.005
Does that imply that x is a function of t? The same t that is being used in the bounds? If so then you should not be doing an integral, and should instead be doing a numeric summation or perhaps a trapz over the x that are in the range t-T/2 to t+T/2
  4 件のコメント
navid jafari
navid jafari 2022 年 7 月 26 日
編集済み: navid jafari 2022 年 7 月 26 日
Thank you again
Nothing is mentioned in the original article about T being odd or even.
we can find the temporal root-mean-square functions from the real data (according that formula) with this code.
This code will probably work.
but,In your opinion, how should we select the tau selection condition in this code?
Thanks
Walter Roberson
Walter Roberson 2022 年 7 月 26 日
In your original, T is a time, but in this code, T is the number of points to use in the window. There could be theoretical differences if the desired window time does not happen to be a multiple of the sample rate.

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

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by