plotnum.m
来自「用VC++编写的遗传算法源程序」· M 代码 · 共 22 行
M
22 行
function plotnum(x,y,h)
%
% plotnum(x,y,h)
%
% plots two x & y vectors using the
% sample number as the indicator rather
% than the usual crappy cross, on the
% axes with handle h
%
[D L]=size(x);
mnx=min(x);
mxx=max(x);
mny=min(y);
mxy=max(y);
axes(h);
for i = 1:D
text(x(i),y(i),num2str(i));
end
set(h,'Xlim',[mnx mxx],'Ylim',[mny mxy]);
drawnow;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?