% Integral 0 to omegabar of f(omega)


function y = truncmean(omega)

y = integral(@Dens,0,omega);

end


function Der = Dens(om)
omega_std=0.26;
omega_mu=-0.5*omega_std^2;
Der = om.*lognpdf(om,omega_mu,omega_std);
end


 
% Prim = uppervar_int;
% 
% function output = uppervar_int
%     output=zeros(1,length(omega));
%     for i=1:length(omega)
%         output(i)=1e-40*integral(@Dens,0,omega(i),'AbsTol',1e-10);
%     end
%     end
%            function Der = Dens(w)
%             Der = 1e+40*1./(sqrt(2*pi*0.28)).*(exp(-((log(w)+1/2*0.28).^2)/(2*0.28)));
%             end
%      
%     
% end
