调整vs2005中源代码字体大小

在vs2005编辑器中选择 工具->选项->环境:选择字体和颜色,然后再选择需要的字体大小和其他所需要的!

以下是MATLABnufft函数的源代码: ```matlab function [y] = nufft(x, om, N, K, n_shift, iflag) %NUFFT NUFFT algorithm (using convolution via FFT) % [y] = nufft(x, om, N, K, n_shift, iflag) % Input % x: input signal (# of samples x # of channels) % om: frequency locations (# of samples x 2) % k = om(:,1) * 2*pi / N; l = om(:,2); % N: signal length % K: # of Fourier modes computed (K>=N) % n_shift: 0 or 1 (default) % perform fftshift or not in the output % iflag: sign of the imaginary unit in the exponential % if iflag>0, e^(iwt) = cos(wt) + i*sin(wt) % if iflag<0, e^(iwt) = cos(wt) - i*sin(wt) % Output % y: output spectrum (# of modes x # of channels) % % If you use this code, please cite the following paper: % Y. C. Eldar, A. J. Feuer, and G. D. Forney, Jr., % "Optimal tight frames and quantum measurement," IEEE Trans. Inform. Theory, vol. 48, no. 3, pp. 599-610, Mar. 2002. % % The NUFFT algorithm is based on the following paper: % A. Dutt and V. Rokhlin, "Fast Fourier transforms for nonequispaced data," SIAM J. Sci. Comput., vol. 14, no. 6, pp. 1368-1393, Nov. 1993. % % The FFTSHIFT function is used to match the output of MATLAB's FFT function. % % Written by Alex Pothen (alex.pothen@gmail.com), Sep 2013. % Modified by Yonina Eldar (yonina.eldar@gmail.com), Oct 2013. if nargin < 6, iflag = 1; end if nargin < 5, n_shift = 1; end if iflag > 0 sign = 1; else sign = -1; end M = size(om,1); % Compute Fourier transform of convolution kernel kk = (-K/2):(K/2-1); vk = exp(sign*2*pi*i*kk/N).'; NN = (-N/2):(N/2-1); n_shift = N*mod(n_shift,2); % make sure n_shift is either 0 or N h = zeros(N,1); h(NN + n_shift + 1) = sqrt(N) * vk .* (abs(NN + n_shift) < K/2); h = ifftshift(h); h = fft(h); % Compute convolution of signal with kernel y = zeros(K,size(x,2)); for ii=1:size(x,2) y(:,ii) = h .* fftshift(fft(ifftshift(x(:,ii)))); end % Compute Fourier transform at om frequencies y = y(mod(om(:,2)),:); y = y(om(:,1)+1,:); % Perform fftshift if required if n_shift y = fftshift(y,1); end ``` 这是一个比较基础的NUFFT实现,将输入信号x与卷积核h卷积,然后在频域对结果进行采样以得到输出y。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值