Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

humps

Matlab Test Functions


Description

Matlab test functions.

Usage

humps(x)
sinc(x)
psinc(x, n)

Arguments

x

numeric scalar or vector.

n

positive integer.

Details

humps is a test function for finding zeros, for optimization and integration. Its root is at x = 1.2995, a (local) minimum at x = 0.6370, and the integral from 0.5 to 1.0 is 8.0715.

sinc is defined as sinc(t) = \frac{\sin(π t)}{π t}. It is the continuous inverse Fourier transform of the rectangular pulse of width and height 1.

psinc is the 'periodic sinc function' and is defined as psinc(x,n) = \frac{\sin(x n/2)}{n \sin(x/2)}.

Value

Numeric scalar or vector.

Examples

## Not run: 
plot(humps(), type="l"); grid()

x <- seq(0, 10, length=101)
plot(x, sinc(x), type="l"); grid()

## End(Not run)

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.