What i have to do is to compute a definite integral for the function:
N(a(t))*b(t)*C(d(t)) dt
Where N(a(t)) is a normal probability function valued at the value a, which is in fact a function that depends on t. C(d(t)) is a cumulative normal probability function valued d, which is also a function that depends on t. And b(t) is another function of t.
I have tried to define first the functions a(t) b(t) and c(t) as function handles. Then i used the commandsnormcdf and normpdf to compute the normal cumulative and probability function on this function (i think this way i obtain also a function handle that depends on t, but i am not sure if this is ok. For example, CNaux1 = @(t)normcdf((K*(T-t))/sigma/sqrt(T-t)) )
Later, i define another function handle integrand= N(a(t)).*b(t).*C(d(t)) and i use the quad (integrand, 0, T) (T previously defined)
I thinh i probably made more than one mistake, i am quite a bit lost...
Thank you very much!