1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 00:22:13 +00:00

octave.pkgs.ltfat: init at 2.3.1

This commit is contained in:
Karl Hallsby 2021-01-06 00:58:32 -06:00 committed by Doron Behar
parent 0b7b03d62c
commit bc8d72e32f
2 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,54 @@
{ buildOctavePackage
, lib
, fetchurl
, fftw
, fftwSinglePrec
, fftwFloat
, fftwLongDouble
, lapack
, blas
, portaudio
, jdk
}:
buildOctavePackage rec {
pname = "ltfat";
version = "2.3.1";
src = fetchurl {
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
sha256 = "0gghh5a4w649ff776wvidfvqas87m0n7rqs960pid1d11bnyqqrh";
};
patches = [
# Fixes a syntax error with performing multiplication.
./syntax-error.patch
];
buildInputs = [
fftw
fftwSinglePrec
fftwFloat
fftwLongDouble
lapack
blas
portaudio
jdk
];
meta = with lib; {
name = "The Large Time-Frequency Analysis Toolbox";
homepage = "https://octave.sourceforge.io/ltfat/index.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ KarlJoad ];
description = "Toolbox for working with time-frequency analysis, wavelets and signal processing";
longDescription = ''
The Large Time/Frequency Analysis Toolbox (LTFAT) is a Matlab/Octave
toolbox for working with time-frequency analysis, wavelets and signal
processing. It is intended both as an educational and a computational
tool. The toolbox provides a large number of linear transforms including
Gabor and wavelet transforms along with routines for constructing windows
(filter prototypes) and routines for manipulating coefficients.
'';
};
}

View file

@ -0,0 +1,15 @@
diff --git a/inst/nonstatgab/nsdgt.m b/inst/nonstatgab/nsdgt.m
index ac53963..81656cb 100644
--- a/inst/nonstatgab/nsdgt.m
+++ b/inst/nonstatgab/nsdgt.m
@@ -149,8 +149,8 @@ for ii = 1:N
col = ceil(Lg/M(ii));
temp = zeros(col*M(ii),W,assert_classname(f,g{1}));
- temp([end-floor(Lg/2)+1:end,1:ceil(Lg/2)],:) = bsxfun(@ ...
- times,f(win_range,:),g{ii}(idx));
+ temp([end-floor(Lg/2)+1:end,1:ceil(Lg/2)],:) = bsxfun(@times, ...
+ f(win_range,:),g{ii}(idx));
temp = reshape(temp,M(ii),col,W);
X = squeeze(fft(sum(temp,2)));