Trying to replicate matlab cumtrapz() function
Hello all,
I am trying to recreate a matlab program in mathcad and the only part I'm struggling with is finding a simple replacement for the matlab cumtrapz() function. It is explained in detail here and here.
So what I have are 2 vectors containing x and y plot points for a shear forces graph. I'd like to generate the moment plot points which involves getting the cumulative integral from one plot point to the next. I'm looking for the simplest way to do this.
A method I've found that appears to work but is a little overly complex is the following:
a := cspline(x, y)
b(x) := interp (a, x, y, c)
c := 0,1..150
f(x) := ∫-b(x) dx (integrate from 0 to x)
and then I can plot f(c) against c
Any help in simplifying is greatly appreciated. Thanks!
* I should note that I am using Prime 4.0 but don't currently have access, so screenshots will work better than files at the moment

