简体   繁体   中英

Why do i have to multiply the convolution value times tpas?

tstart=0;

tstop=0.1;

tpas=0.0001;
   
f=100;

t=tstart:tpas:tstop;

x=0+10*t;

subplot(3,1,1);

plot(t,x,'linewidth',2);

axis([0 0.1001 0 1]);grid;

h=1*exp(-f*t);

subplot(3,1,2);

plot(t,h,'linewidth',2);

axis([0 0.1001 0 1]);

grid;

t2=2*tstart:tpas:2*tstop;

y=conv(x,h) * tpas; // what does this line do? more specifically, why do i have the conv function times tpas value?

subplot(3,1,3);

plot(t2,y,'r','linewidth',2);

axis();

grid;

I posted the whole code for context but really i just need to know what happens when i multiply the convolution value with tpas.

Your filter is h=1*exp(-f*t) , which is sampled at time values t=tstart:tpas:tstop

The number of simples in your filter is (tstop-tstart)/tpas . The integral (just the sum of those samples) is therefore proportional to 1/tpas .

The convolution will multiply your signal by this factor, so the result is multiplied by tpas to correct it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM