www.pudn.com > tfarma10.rar > nm_to_nk.m, change:2004-01-15,size:1367b


function B= nm_to_nk(A)
% function B= nm_to_nk(A)
%   This file is part of the TFPM toolbox v1.0 (c)
%   michael.jachan@tuwien.ac.at and underlies the GPL.
% 
% The function 
% A[n, m], n= 0:N-1; m= -N/2:N/2-1 
% is Fourier transformed into the function 
% B[n, k], n= 0:N-1; k= -N/2:N/2-1. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear;%tfpm;
MAR  =   7;
LAR  =   5;
MMA  =   5;
LMA  =   3;
N    =  64;
re_im= 'i';
mo_no= 'm';
tfpm_file_gen;
%-------------
alpha= 1/2;
A= alpharize(tvarma_impr(Amn, Bmn), 0, alpha);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Dimensions:
N= size(A, 1);

B= fft([A(:, N/2+1:N) A(:, 1:N/2)].').';
B= [B(:, N/2+1:N) B(:, 1:N/2)];

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
max(max(abs(A-nk_to_nm(B))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%