Trapezoidal numerical integration using for loops
26 views (last 30 days)
I'm trying to create a for loop that calcuates the trapezoidal rule for a arrray of x and fx values without using the trapz function at different x points.
x = 0, 0.25, 0.5, 0.75, 1
y = 0, 0.03, 0.006, 0.001, 0.06
Can someone please provide some guidance