fgetf.m

来自「包含大量遗传算法程序」· M 代码 · 共 25 行

M
25
字号
function [fout,wout]=fgetf(w,f,index)
%FGETF  Get component matrices from MVFR matrix.
%       FGETF(W,F,INDEX) gets the component matrices
%       of the MVFR matrix, F, associated with W(INDEX)
%       INDEX is a vector of indices to W.
%       W is the associated frequency vector.
%
%       [FOUT,WOUT]=FGETF(W,F,INDEX) also returns the
%       associated output frequency vector, WOUT.
%       See also FGET,FPUT

%       Dr M.P. Ford 4th August 1987
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd


[m,n]=fsize(w,f);
wout=w(index);
k=1:m;
ind=[];
for i=1:length(index)
  ind=[ind,k+m*(index(i)-1)];
end
fout=f(ind,:);

⌨️ 快捷键说明

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