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

📄 nullspace.m

📁 几个关于多小波的程序
💻 M
字号:
function Z = nullspace(A)

% NULLSPACE --  find nullspace of a matrix
%
%         Z = nullspace(A)
%
% This does essentially the same thing as the Matlab system
% routine NULL, except it uses the tolerance parameter MPOLY_TOLERANCE
% instead of the Matlab default tolerance.
%
% I found this to be necessary for some calculations with larger
% biorthogonal wavelets, where the Matlab system routine would not
% report the correct approximation order.
%
% If A is symbolic, call the system routine without the tolerance parameter.

% Copyright (c) 2004 by Fritz Keinert (keinert@iastate.edu),
% Dept. of Mathematics, Iowa State University, Ames, IA 50011.
% This software may be freely used and distributed for non-commercial
% purposes, provided this copyright statement is preserved, and
% appropriate credit for its use is given.
%
% Last update: Feb 20, 2004

global MPOLY_TOLERANCE

if isempty(MPOLY_TOLERANCE)
    tol = 1.e-12;
else
    tol = MPOLY_TOLERANCE;
end

% If A is symbolic, call the system routine
if (isa(A,'sym'))
    A = simplify(A);
    Z = null(A);
    Z = simplify(Z);
    return
end

% find the nullspace within tolerance tol
[m,n] = size(A);
[U,S,V] = svd(A,0);
if m > 1 
    s = diag(S);
elseif m == 1
    s = S(1);
else 
    s = 0;
end
r = sum(s > tol);
Z = V(:,r+1:n);

⌨️ 快捷键说明

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