I'm trying to create a basic double integral calculator. How do I refine the code I have so far?
fun = @(x,y) input('enter integrand = ') xmin = @(y) input('enter lower x boundary = ') xmax = @(y) input('enter upper x boundary = ') ymin = @(x) input('enter lower y boundary = ') ymax = @(x) input('enter upper y boundary = ') Q = integral2(fun,xmin,xmax,ymin,ymax)
Best Answer
Use the str2func (link) function. I would also use vectorize (link):