furstj / interpolation

Octave/MATLAB like interpolation routines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

interpolation

ubuntu with gfortran msys windows gfortran macos with gfortran

The library implements interp1 function similar to Octave/MATLAB.

Example program

program example1

  use iso_fortran_env, only: real64
  use interpolation
  
  real(real64) :: x(5) = [1, 2, 3, 4, 5]
  real(real64) :: y(5) = [0, 1, 0, 1, 0]
  real(real64) :: xi, yi
  
  xi = 1.5
  yi = interp1(x, y, xi, method="pchip")
  
  print *, "Interpolated value is ", yi

end program example1

More examples can be found in example folder.

Use in FPM project

Add the library as a dependency

[dependencies]
interpolation = { git = "https://github.com/furstj/interpolation" }

API documentation

You can find the automatically published documentation here.

Build and Deploy Documentation

About

Octave/MATLAB like interpolation routines

License:MIT License


Languages

Language:Fortran 100.0%