0
$\begingroup$

A definite integral is a convolution with idial all '1' filter(by the theory) so i tried to test this issue with MATLAB. i have taken a function called fun made an integral over it in 1e-6 - 20*e-6 interval the result is called simbolic_int_result which 37.7 then i have taken fun sampled it in 1e-6 - 20*e-6 interval as shown bellow with 1000 samples and created all "1" filter (idial) and used CONV to make convolution,but its not working, instead of a scalar i get 2000X1 vector Where did i go wrong? Thanks.

c0=2.997*10.^8;% m/s speed of light in vaccum
h=6.625*10.^-34;% J.s Planck constant
k=1.38*10.^-23;%  T/K Boltzmann constant
n=1;

T=307;%  Temperature initiatlisation
fun=@(lambda)(2*pi.*h.*(c0.^2))./((n.^2).*(lambda.^5).*(exp((h.*c0)./(k.*T.*lambda))-1));
simbolic_int_result= integral(fun,1e-6,20e-6)/10;

k=linspace(10.^-6,20*10^-6,1000);
fun_vector=fun(k);

filter=linspace(1,1,1000); % all ones idial filter

convolution_result=conv(filter,fun_vector);
$\endgroup$

1 Answer 1

1
$\begingroup$

A definite integral is a convolution with idial all '1' filter(by the theory)

No. Where does that theory come from ?

If you want to approximate a definite integral with a discrete sequence, you can simply sum up the samples in the integration interval and scale the sum by the sampling interval.

The output of a convolution of two functions is another function, not a single value.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.