Answers for "trapz in r"

0

trapz in r

library(pracma)
  # Calculate the area under the sine curve from 0 to pi:
  x <- seq(0, pi, len = 101)
  y <- sin(x)
  trapz(x, y)                       #=> 1.999835504
Posted by: Guest on October-19-2020

Browse Popular Code Answers by Language