JuliaMath / JuliaMath/NumericalIntegration.jl

cumul_integrate gives wrong result?

Open
#43 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
66
Forks
19
PR merge metrics
No merged PRs in 30d

Description

```julia
julia> x = collect(1.0:5.0)
5-element Vector{Float64}:
1.0
2.0
3.0
4.0
5.0

julia> y = x.^2
5-element Vector{Float64}:
1.0
4.0
9.0
16.0
25.0

julia> cumul_integrate(x, y)
5-element Vector{Float64}:
2.5
5.0
11.5
24.0
44.5
```

The result is different from
https://www.mathworks.com/help/matlab/ref/cumtrapz.html

Should we expect an array like `[2.5, 9.0, 21.5, 42.0]` from `cumul_integrate`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.