Table Of Contents


    Last Modified: March 15, 2017

    Computes the cumulative trapezoidal numerical integration of a vector, a matrix, or an array of any dimension.


    c = accumtrapint(a)
    c = accumtrapint(b, a)
    c = accumtrapint(a, dim)
    c = accumtrapint(b, a, dim)
    Legacy name: cumtrapz



    Vector, matrix, or array of any dimension.


    Vector, matrix, or n-dimensional array. If b is a vector, a must be a vector of the same length. If b is an array, a must be a vector and the first non-singleton dimension of b must be length(a).


    Dimension. dim is an integer.



    Cumulative trapezoidal integrals of a. If you use the syntax accumtrapint(a, dim), MathScript computes the cumulative trapezoidal integrals of elements along the dimension dim. If you omit dim, MathScript uses the first non-singleton dimension. If you use the syntax accumtrapint(a,b), MathScript evaluates the integral with respect to the spacing in a and the values in b. The syntax accumtrapint(a,b dim) integrates along the dimension dim of b.

    A = [1:0.1:3];
    B = A.^2;
    C = accumtrapint(B)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: This product does not support FPGA devices

    Recently Viewed Topics