?? xplt.m
字號:
function out = xplt(NP,pop,vec,flag)% xplt plots a coloured point with coordinates vec(1), vec(2)% on a 3D-surface if flag is not equal 0. Otherwise NP colored% points, stored in pop, will be plotted.%% Example: xplt(NP,pop)% where pop is a two-dimensional array of NP points% %% Used by: der.mif (flag == 0) %---draw entire population---------- for i=1:NP x1=pop(i,1); x2=pop(i,2); z1=100*(x2-x1.^2).^2+(1-x1).^2; plot3(x1,x2,z1,'r.', ... 'EraseMode','none', ... 'MarkerSize',15); drawnow; %---Draws current graph now out = []; endelse x1 = vec(1); x2 = vec(2); z1=100*(x2-x1.^2).^2+(1-x1).^2; plot3(x1,x2,z1,'r.', ... 'EraseMode','none', ... 'MarkerSize',15); drawnow; %---Draws current graph now out = [];end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -