You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: nufft.m
    path of file: ./repos/CS_MoCo_LAB/reconstruction/matlab/CS_LAB_matlab/utils/utils_NUFFT
    
    the code of the file until where you have to start completion:  function X = nufft(x, st)
%function X = nufft(x, st)
%	Compute d-dimensional NUFFT of signal/image x
% in
%	x	[N1,N2,...,Nd,(L)]	L input image(s) of size
%						N1 x N2 x ... x Nd
%	st	structure		precomputed by nufft_init()
% out
%	X	[M,(L)]			output spectra
    
function X = nufft(x, st)
%function X = nufft(x, st)
%	Compute d-dimensional NUFFT of signal/image x
% in
%	x	[N1,N2,...,Nd,(L)]	L input image(s) of size
%						N1 x N2 x ... x Nd
%	st	structure		precomputed by nufft_init()
% out
%	X	[M,(L)]			output spectra
%
% Copyright 2003-5-30	Jeff Fessler	The University of Michigan

%
% if no arguments, then run some self tests
%
if nargin < 1
	help([mfilename '.m'])

	disp('Starting nufft() self test; after a wait, shows small errors')
	if 0
		Jd = [5 4 4];
		Nd = [23 15 19];
		alpha_user = {1, 1, 1};		% default alpha, beta
		beta_user = {0.5, 0.5, 0.5};
	else
		Jd = [5 6];
		Nd = [60 75];
		alpha_user = {1, 1};
		beta_user = {0.5, 0.5};
	end