# FourierBasis: Fourier basis functions In USP: U-Statistic Permutation Tests of Independence for all Data Types

## Description

Computes the values of the one-dimensional Fourier basis functions at a vector of locations x and with a vector of frequencies m. The scaling factor of is included, so that the function returns, e.g., √{2} \cos(2π m x).

## Usage

 1 FourierBasis(a, m, x) 

## Arguments

 a Sine or cosine; a=0 gives cosine and a=1 gives sine. m Vector of frequencies m. x Vector of locations x.

## Value

Returns the values of √{2} \cos(2π m x).

\insertRef

BKS2020USP

## Examples

 1 2 3 e=FourierBasis(1,1:100,0.01); plot(0.01*(1:100),e,type="l") e=FourierBasis(0,1,0.01*(1:100)); plot(0.01*(1:100),e,type="l") FourierBasis(1,1:3,0.1*(1:10)) 

USP documentation built on Jan. 27, 2021, 5:08 p.m.