⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frat.m

📁 为stanford大学donoho教授所编写的redgit变换源代码。是用c编写的
💻 M
字号:
function [r, m] = frat(f)
% FRAT  Finite Radon Transform
%
%       [r, m] = frat(f)
%
% Input:
%       f:      a P by P matrix.  P is a prime.
%
% Output:
%       r:      a P by (P+1) matrix.  One projection per each column.
%       m:      (optional), normalized mean of the input matrix.
%               In this case, the mean is subtracted from each column of r.
%  
% See also:     IFRAT

if ndims(f) ~= 2
    error('Input must be a matrix of 2 dimensions');
end

p = size(f, 1);
if (size(f, 2) ~= p) | ~isprime(p)
    error('Input must be a P by P matrix, P is a prime number')
end

% Compute the best sequence of directions
s = bestdir(p);

% Calling the MEX file that does the actual computation of FRAT
if nargout == 2
    [r, m] = fratc(f, s);
else
    r = fratc(f, s);
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -