blob: f7e5c8e61a577123843a7d8de2fd52e6130935be (
plain)
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
29
|
function y=fht(d,n,dim)
//The Function calculates the Fast Hartley Transform of real input.
//Calling Sequence
//M = fht (D)
//M = fht (D, N)
//M = fht (D, N, DIM)
//Parameters
//Description
//This function calculates the Fast Hartley transform of real input D. If D is a matrix, the Hartley transform is calculated along the columns by default.
//Examples
//fht(1:4)
//ans =
// 10 -4 -2 0
//This function is being called from Octave.
funcprot(0);
rhs=argn(2);
if(rhs<1 | rhs>3)
error("Wrong number of input arguments.")
end
select(rhs)
case 1 then
y=callOctave("fht",d)
case 2 then
y=callOctave("fht",d,n)
case 3 then
y=callOctave("fht",d,n,dim)
end
endfunction
|