plotdataset.m
来自「神经网络工具箱」· M 代码 · 共 26 行
M
26 行
%
%
% see dataset
%
%
name='gaussian';
nbapp=1600;
nbtest=1600;
sigma=1;
[xapp yapp xtest ytest]=dataset(name,nbapp,nbtest,sigma);
xapp=xapp*2;
indposapp=find(yapp==1);
indnegapp=find(yapp==-1);
plot(xapp(indposapp,1),xapp(indposapp,2),'b+',xapp(indnegapp,1),xapp(indnegapp,2),'xr');
title('Learning Set');
figure
indpostest=find(ytest==1);
indnegtest=find(ytest==-1);
plot(xtest(indpostest,1),xtest(indpostest,2),'b+',xtest(indnegtest,1),xtest(indnegtest,2),'xr');
title('Testing Set');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?