annotate src/DLD-FUNCTIONS/fftn.cc @ 9064:7c02ec148a3c

Check grammar on all .cc files Same check as previously done on .m files Attempt to enforce some conformity in documentation text for rules such as two spaces after a period, commas around latin abbreviations, etc.
author Rik <rdrider0-list@yahoo.com>
date Sat, 28 Mar 2009 13:57:22 -0700
parents eb63fbe60fab
children bd8e388043c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
1 /*
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
2
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8496
diff changeset
3 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 David Bateman
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
4
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
6
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7007
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7007
diff changeset
10 option) any later version.
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
11
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
15 for more details.
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
16
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7007
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7007
diff changeset
19 <http://www.gnu.org/licenses/>.
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
20
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
21 */
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
22
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
23 #ifdef HAVE_CONFIG_H
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
24 #include <config.h>
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
25 #endif
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
26
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
27 #include "lo-mappers.h"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
28
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
29 #include "defun-dld.h"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
30 #include "error.h"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
31 #include "gripes.h"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
32 #include "oct-obj.h"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
33 #include "utils.h"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
34
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
35 // This function should be merged with Fifft.
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
36
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
37 #if defined (HAVE_FFTW3)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
38 #define FFTSRC "@sc{Fftw}"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
39 #else
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
40 #define FFTSRC "@sc{Fftpack}"
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
41 #endif
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
42
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
43 static octave_value
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
44 do_fftn (const octave_value_list &args, const char *fcn, int type)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
45 {
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
46 octave_value retval;
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
47
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
48 int nargin = args.length ();
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
49
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
50 if (nargin < 1 || nargin > 2)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
51 {
5823
080c08b192d8 [project @ 2006-05-19 05:32:17 by jwe]
jwe
parents: 5642
diff changeset
52 print_usage ();
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
53 return retval;
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
54 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
55
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
56 octave_value arg = args(0);
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
57 dim_vector dims = arg.dims ();
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
58
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
59 for (int i = 0; i < dims.length (); i++)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
60 if (dims(i) < 0)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
61 return retval;
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
62
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
63 if (nargin > 1)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
64 {
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
65 Matrix val = args(1).matrix_value ();
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
66 if (val.rows () > val.columns ())
4849
a3440ff5eb14 [project @ 2004-04-06 15:23:56 by jwe]
jwe
parents: 4787
diff changeset
67 val = val.transpose ();
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
68
4849
a3440ff5eb14 [project @ 2004-04-06 15:23:56 by jwe]
jwe
parents: 4787
diff changeset
69 if (error_state || val.columns () != dims.length () || val.rows () != 1)
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
70 error ("%s: second argument must be a vector of length dim", fcn);
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
71 else
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
72 {
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
73 for (int i = 0; i < dims.length (); i++)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
74 {
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
75 if (xisnan (val(i,0)))
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
76 error ("%s: NaN is invalid as a dimension", fcn);
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 4849
diff changeset
77 else if (NINTbig (val(i,0)) < 0)
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
78 error ("%s: all dimension must be greater than zero", fcn);
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
79 else
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
80 {
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 4849
diff changeset
81 dims(i) = NINTbig(val(i,0));
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
82 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
83 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
84 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
85 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
86
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
87 if (error_state)
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
88 return retval;
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
89
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
90 if (dims.all_zero ())
7924
4976f66d469b miscellaneous cleanup
John W. Eaton <jwe@octave.org>
parents: 7814
diff changeset
91 {
4976f66d469b miscellaneous cleanup
John W. Eaton <jwe@octave.org>
parents: 7814
diff changeset
92 if (arg.is_single_type ())
4976f66d469b miscellaneous cleanup
John W. Eaton <jwe@octave.org>
parents: 7814
diff changeset
93 return octave_value (FloatMatrix ());
4976f66d469b miscellaneous cleanup
John W. Eaton <jwe@octave.org>
parents: 7814
diff changeset
94 else
4976f66d469b miscellaneous cleanup
John W. Eaton <jwe@octave.org>
parents: 7814
diff changeset
95 return octave_value (Matrix ());
4976f66d469b miscellaneous cleanup
John W. Eaton <jwe@octave.org>
parents: 7814
diff changeset
96 }
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
97
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
98 if (arg.is_single_type ())
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
99 {
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
100 if (arg.is_real_type ())
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
101 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
102 FloatNDArray nda = arg.float_array_value ();
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
103
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
104 if (! error_state)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
105 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
106 nda.resize (dims, 0.0);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
107 retval = (type != 0 ? nda.ifourierNd () : nda.fourierNd ());
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
108 }
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
109 }
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
110 else
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
111 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
112 FloatComplexNDArray cnda = arg.float_complex_array_value ();
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
113
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
114 if (! error_state)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
115 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
116 cnda.resize (dims, 0.0);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
117 retval = (type != 0 ? cnda.ifourierNd () : cnda.fourierNd ());
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
118 }
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
119 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
120 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
121 else
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
122 {
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
123 if (arg.is_real_type ())
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
124 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
125 NDArray nda = arg.array_value ();
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
126
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
127 if (! error_state)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
128 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
129 nda.resize (dims, 0.0);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
130 retval = (type != 0 ? nda.ifourierNd () : nda.fourierNd ());
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
131 }
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
132 }
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
133 else if (arg.is_complex_type ())
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
134 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
135 ComplexNDArray cnda = arg.complex_array_value ();
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
136
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
137 if (! error_state)
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
138 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
139 cnda.resize (dims, 0.0);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
140 retval = (type != 0 ? cnda.ifourierNd () : cnda.fourierNd ());
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
141 }
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
142 }
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
143 else
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
144 {
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
145 gripe_wrong_type_arg (fcn, arg);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7017
diff changeset
146 }
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
147 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
148
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
149 return retval;
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
150 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
151
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
152 DEFUN_DLD (fftn, args, ,
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
153 "-*- texinfo -*-\n\
4787
02c748eb2ddc [project @ 2004-02-18 21:20:26 by jwe]
jwe
parents: 4782
diff changeset
154 @deftypefn {Loadable Function} {} fftn (@var{a}, @var{size})\n\
8496
caaad80e81aa [docs] add hyphen
Brian Gough <bjg@gnu.org>
parents: 7924
diff changeset
155 Compute the N-dimensional FFT of @var{a} using subroutines from\n"
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
156 FFTSRC
4787
02c748eb2ddc [project @ 2004-02-18 21:20:26 by jwe]
jwe
parents: 4782
diff changeset
157 ". The optional vector argument @var{size} may be used specify the\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
158 dimensions of the array to be used. If an element of @var{size} is\n\
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
159 smaller than the corresponding dimension, then the dimension is\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
160 truncated prior to performing the FFT. Otherwise if an element\n\
4787
02c748eb2ddc [project @ 2004-02-18 21:20:26 by jwe]
jwe
parents: 4782
diff changeset
161 of @var{size} is larger than the corresponding dimension @var{a}\n\
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
162 is resized and padded with zeros.\n\
6971
0a9d97cf2e13 [project @ 2007-10-07 19:44:53 by dbateman]
dbateman
parents: 5823
diff changeset
163 @seealso {ifftn, fft, fft2, fftw}\n\
5642
2618a0750ae6 [project @ 2006-03-06 21:26:48 by jwe]
jwe
parents: 5307
diff changeset
164 @end deftypefn")
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
165 {
4782
3dfdf6f36854 [project @ 2004-02-17 16:23:22 by jwe]
jwe
parents: 4773
diff changeset
166 return do_fftn (args, "fftn", 0);
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
167 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
168
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
169 DEFUN_DLD (ifftn, args, ,
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
170 "-*- texinfo -*-\n\
4787
02c748eb2ddc [project @ 2004-02-18 21:20:26 by jwe]
jwe
parents: 4782
diff changeset
171 @deftypefn {Loadable Function} {} ifftn (@var{a}, @var{size})\n\
8496
caaad80e81aa [docs] add hyphen
Brian Gough <bjg@gnu.org>
parents: 7924
diff changeset
172 Compute the inverse N-dimensional FFT of @var{a} using subroutines from\n"
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
173 FFTSRC
4787
02c748eb2ddc [project @ 2004-02-18 21:20:26 by jwe]
jwe
parents: 4782
diff changeset
174 ". The optional vector argument @var{size} may be used specify the\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
175 dimensions of the array to be used. If an element of @var{size} is\n\
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
176 smaller than the corresponding dimension, then the dimension is\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
177 truncated prior to performing the inverse FFT. Otherwise if an element\n\
4787
02c748eb2ddc [project @ 2004-02-18 21:20:26 by jwe]
jwe
parents: 4782
diff changeset
178 of @var{size} is larger than the corresponding dimension @var{a}\n\
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
179 is resized and padded with zeros.\n\
6971
0a9d97cf2e13 [project @ 2007-10-07 19:44:53 by dbateman]
dbateman
parents: 5823
diff changeset
180 @seealso {fftn, ifft, ifft2, fftw}\n\
5642
2618a0750ae6 [project @ 2006-03-06 21:26:48 by jwe]
jwe
parents: 5307
diff changeset
181 @end deftypefn")
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
182 {
4782
3dfdf6f36854 [project @ 2004-02-17 16:23:22 by jwe]
jwe
parents: 4773
diff changeset
183 return do_fftn (args, "ifftn", 1);
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
184 }
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
185
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
186 /*
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
187 ;;; Local Variables: ***
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
188 ;;; mode: C++ ***
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
189 ;;; End: ***
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents:
diff changeset
190 */