showfields.m

来自「可以方便利用训练数据建立径向基函数神经网络并绘制输入-输出网格图。」· M 代码 · 共 25 行

M
25
字号
% showfields.mfigure(2), clf reset, colormap(jet), hold onset(gca,'ButtonDownFcn','clickhandler')hand1 = []; hand2 = [];axis equal, axis(axvals(1:4)+[-0.5 0.5 -0.5 0.5]), circpts = 0:pi/20:2*pi;xpts = cos(circpts);ypts = sin(circpts);colors = 'wcymg';for i=1:NUNITS  c = colors(ceil(rand(1,1)*length(colors)));  hand1(i)=plot(xpts*sigmavals(i,1)+xcenters(i),ypts*sigmavals(i,2)+ycenters(i),c);  hand2(i)=plot(xcenters(i),ycenters(i),[c '+']);endset(hand1,'ButtonDownFcn','clickhandler')set(hand2,'ButtonDownFcn','clickhandler')xlabel('x'),ylabel('y')hpt = plot(-5,-5,'r*');  % used by clickhandlerdrawnowuicontrol('Style','Pushbutton','Position',[0 0 50 20], ...    'String','Recolor', ...    'CallBack','recolor_fields')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?