how does double integration work
Show older comments
Hello eveyone, please I am trying to find the first and second integral of a given fuction (say x). I wrote a code below. But it seems the second integration plot does not work appropriately. pls can someone help me. And also make other neccessary corrections. Thank you for your help
x = -100: 1/10:100;
f = 6*x;
first_integral_plot = cumtrapz(x, f); % Integration
second_integral_plot = cumtrapz(x, first_integral_plot ); % Integration
figure;subplot; subplot(311);plot(real(f));title('original function')
subplot(312);plot(first_integral_plot);title('integration2')
subplot(313); plot(second_integral_plot);title('integration2')
Accepted Answer
More Answers (0)
Categories
Find more on Numeric Solvers 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!


