Skip to content

Commit

Permalink
Tidy up ArrayFuncs
Browse files Browse the repository at this point in the history
  • Loading branch information
tclements committed Jul 22, 2019
1 parent 83027c2 commit 4e65595
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/ArrayFuncs.jl
Original file line number Diff line number Diff line change
@@ -1,26 +1,7 @@
export detrend, detrend!, demean, demean!, bandpass, bandpass!, bandstop, bandstop!,
lowpass, lowpass!, highpass, highpass!, phase!, phase
import Statistics.mean
import LinearAlgebra.pinv
using DSP
# Signal processing functions for arrays (rather than SeisData or SeisChannel)

"""
lstsq(A,X)
Least-squares regression of array `A` using the pseudo-inverse.
Solves the equation `A X = B` by computing a vector `X` that
minimizes the Euclidean 2-norm `|| B - A X ||^2`.
# Arguments
- `A::AbstractArray`: Coefficient matrix.
- `X::AbstractArray`: Dependent variable.
"""
function lstsq(A::AbstractArray,X::AbstractArray)
coeff = pinv(A' * A) * A' * X
end

"""
detrend!(X::AbstractArray{<:Union{Float32,Float64},1})
Expand Down

0 comments on commit 4e65595

Please sign in to comment.