find_column.m
来自「用于Hooke—Jeeve模式搜索算法」· M 代码 · 共 13 行
M
13 行
function [y,i]=find_column(x,n)
%input x is a vector,n is a scale
%output y is the min of x
% i is the column of y in x
y=x(1);
i=1;
for j=2:n
if x(j)<y
y=x(j);
i=j;
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?