Definte Integration of a Received Sequence

2 views (last 30 days)
S. David
S. David on 4 Jun 2014
Edited: S. David on 4 Jun 2014
Hello all,
I have the sequence v of length K-by-1. I want to do integration of v over nn*nsamp to (nn+1)*nsamp for nn=0, ..., N-1 and K=nsamp*N. I did this in MATLAB as following:
y=zeros(N,1);
for nn=0:N-1
y(nn)=sum(v(nn*nsamp:(n+1)*nsamp))
end
Is this right?
  2 Comments
S. David
S. David on 4 Jun 2014
Edited: S. David on 4 Jun 2014
Yes you are right, I should have written
...
y(nn+1)=sum(v(nn*nsamp+1:(n+1)*nsamp))
...
Actually, v corresponds to the continuous time signal v(t) where
t=0:Ta:(K-1)*Ta
I want to do the integration:
yn=int_{n*Ts}^{(nn+1)*Ts} v(t) dt % n=0,...,N-1
where Ta=Ts/nsamp.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by