Hello all,
I am planning on running the quadv routine on a function that has been symbolically created, and am having trouble.
What I did was to first create a function that within it, involves symbolic variables x1 and x2. (doesn't work)
I want to be able to run the quadv function on only one of the parameters given, say x1, so that the final integrated solution only varies in x2.
Here is a simple representation of what I have right now:
function fun=myfun(alpha)syms x1 x2fun=x1*x2%function itself simplified to visualize concept
subs(fun,'x2',alpha)end%another program
quadv(myfun,1,2000)% this will perform integration on x2 so when done function % will be in x.
Any help will be appreciated. Also, as a side question- is there any way to create a function and also call the function in the same file?
thanks to all in advance.
Best Answer