how to Integral function with two independent variables ?
1 view (last 30 days)
I need to integrate my function with two variables,and the date is a matrix with two columns，the function is：i=100,and the variables x and y is knowed.
I think maye i shoule use the function integral2,but i dont konw how to deal with the "i"
I try to write some code,maybe is it right? but the bold code ,i don't know how to write
q = integral2(fun,xmin,xmax,ymin,ymax,Name,Value)
anyone can help me ??
Thank you very much ！
Shubham Rawat on 8 Feb 2021
You are using variables and but your limits are on i. So I am not able to figure out who are the variables which you want to integrate.
You may use summation here instead of using integration. You can use help from the following code:
sum = zeros(100,1);
sum(i) = (x(i)/y(i))*(x(i) + y(i));
Hope this Helps!