-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathffth.m
More file actions
28 lines (25 loc) · 747 Bytes
/
Copy pathffth.m
File metadata and controls
28 lines (25 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function out = ffth( in, varargin )
% out = ffth( in )
%
% Compute the adjoint of the FFT
%
% Written by Nicholas Dwork, Copyright 2023
%
% https://github.com/ndwork/dworkLib.git
%
% This software is offered under the GNU General Public License 3.0. It
% is offered without any warranty expressed or implied, including the
% implied warranties of merchantability or fitness for a particular
% purpose.
p = inputParser;
p.addOptional( 'nFFT', [], @ispositive );
p.addOptional( 'dim', [], @ispositive );
p.parse( varargin{:} );
nFFT = p.Results.nFFT;
dim = p.Results.dim;
if numel( dim ) > 0
out = size( in, dim ) * ifft( in, nFFT, dim );
else
out = numel( in ) * ifft( in, nFFT, dim );
end
end