I’m trying to find an integral
b = ((8*WL* Requ)/(pie* WC *Eequ))^.5
z = quad( 'exp(sqrt(1-((x.^2)./b^2) ))',-b,b)
I used Simpson quadrature (quad) built in command for this. I got the right results but my problem is that, I want quad command to pick up automatically the changing values of (b) from the formula of (b) written in my code. But it didn’t do that. I have to put in each changing value of (b) into function.
quad is aimed at numerical integration. In your posted code the integrand is written as symbolic expression (string).