📄 fget.m
字号:
function x=fget(w,f,index)
%FGET Get elements from MVFR matrix.
% FGET(W,F,INDEX) returns the specified elements of
% the component matrices of the MVFR matrix, F,
% as columns in the result matrix.
% INDEX is a two column matrix whose rows specify the
% the elements to be selected.
% W is the associated frequency vector.
%
% FGET(W,F) returns all the elements of F in the order
% set by A(:).'
% See FPUT,FGETF
% Dr M.P. Ford 4th August 1987
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd
[m,n]=fsize(w,f);
lw=length(w);
kl=0:m:(lw-1)*m;
if nargin==3
[me,ne]=size(index);
if ne~=2
error('Wrong number of columns in Index array');
end
x=zeros(lw,me);
for i=1:me % for each index
x(:,i)=f(kl+index(i,1),index(i,2));
end % if nargs==3
else % nargs == 2
x=zeros(lw,m*n);
for j=1:n
for i=1:m
x(:,(j-1)*m+i)=f(kl+i,j);
end
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -