📄 fsvd.m
字号:
function [u,s,v]=fsvd(w,f)
%FSVD Singular values of MVFR matrix.
% FSVD(W,F) returns the singular values, one row per
% frequency, of the component matrices of the MVFR matrix, F.
%
% [U,S,V]=FSVD(W,F) returns the U,S,V matrices as MVFR
% matrices whose component matrices are
% [Um,Sm,Vm]=svd(Fm)
% where Fm are the component matrices of F.
% Refer to SVD for the format of the component
% matrices Um, Sm and Vm.
% See also FEIG
% Dr M.P. Ford 4th August 1987
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd
nargs=nargout;
[m,n]=fsize(w,f);
mn=min(m,n);
lw=length(w);
k=1:m; % vector of rows of each matrix in F
p=1:n;
if nargs==3 % both singular values and matrices required
s=zeros(lw*m,n); % Set up output matrix for values
u=zeros(lw*m,m); % Set up output matrix for vectors
v=zeros(lw*n,n);
for i=1:lw % for each frequency
[uvec,sval,vvec]=svd(f(k+(i-1)*m,:));
u(k+m*(i-1),:)=uvec;
s(k+m*(i-1),:)=sval;
v(p+n*(i-1),:)=vvec;
end % for i=1:lw
elseif nargs==1 % only singular values required
u=zeros(lw,mn); % Set up output matrix for values
for i=1:lw % for each frequency
u(i,:)=svd(f(k+(i-1)*m,:)).'; % transpose singular values
end % for i=1:lw
else
error('Must have 1 or 3 output arguments');
end % else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -