📄 ffun.m
字号:
function fout=ffun(w,f,fun)
%FFUN Apply function to MVFR matrix.
% FFUN(W,F,'fun') applies the function specified in the
% string 'fun' to the MVFR matrix, F.
% W is the associated frequency vector.
% The results are returned as an MVFR matrix.
% Any function that accepts a matrix and returns a single
% result can be specified in the string 'fun'.
% 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);
funstr=['fout=[fout;',fun,'(fm)];'];
k=1:m;
fout=[];
for i=0:lw-1
fm=f(k+m*i,:); % break up f into matrices
eval(funstr); % evaluate function and append to fout
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -