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);