fmax.m
来自「MFD-多变量系统频域设计工具」· M 代码 · 共 32 行
M
32 行
function [y,i]=fmax(w,f)
%FMAX Maximum of MVFR matrix
% FMAX(W,F) applies MAX to each component matrix of
% the MVFR matrix, F, and returns one row per frequency.
%
% [Y,I]=FMAX(W,F) also returns the indices of the
% maximum elements in each component matrix.
% See MAX,FMIN
% 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);
k=1:m;
if min(m,n)==1
n=1;
end
y=zeros(lw,n);
if nargout==2
i=zeros(lw,n);
for j=1:lw
[y(j,:),i(j,:)]=max(f(k+m*(j-1),:)); % break up f into matrices
end
else
for j=1:lw
y(j,:)=max(f(k+m*(j-1),:)); % break up f into matrices
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?