Sliding window integrator in matlab code

7 次查看(过去 30 天)
NTR
NTR 2011-11-14
Hi, I want to implement sliding window integration using matlab code. I know its easy to implement in simulink(its taking large time due to large computation data). but i need this in matlab code. Can any one please provide hints how can i proceed. I have signal with pulse period of 5seconds and my signal is high from 2 to 3 sec.I want to integrate signal only during this period 2 to 3sec.
thank you. NTR

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2011-11-14
The key function is conv().
  7 个评论
NTR
NTR 2011-11-15
Hi Jiang Thank you are your valuable support. I am doing this by multiplying input with square wave. but I have one question
When we multiply two signal the result will also have unwanted inter modulation products(like mixer).I mean unwanted frequency components.Do you have any comment how these will affect our integrator result.
Fangjun Jiang
Fangjun Jiang 2011-11-15
I don't understand what you are talking about. If signal=rand(6,1), selection=[0 0 1 1 0 0], then r=selection*signal is the same as above, the sum of the value at t==2 and t==3.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by