definite integral w/o using symbolic variable
Show older comments
I am trying to integrate a function, then store that value, then change a value in the function, integrate again, store that value, and so on.
here is the idea
x=0:10;
x1 = 2;
x2 = 5;
m = 1;
i = 1;
if m < 5
F = inline('m*x');
AUC(i) = quadl(F,x1,x2);
m = m+1;
i = i+1;
end
M=1:4;
plot(M,AUC)
obviously this code does not work. I need to update the line F=inline for every value of m. How do I do this, or is there another way?
Accepted Answer
More Answers (0)
Categories
Find more on Function Creation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!