example42_figure.m

来自「是一个用MATLAB编的一个系统」· M 代码 · 共 19 行

M
19
字号

%svm2_figure:to look the figure of input data
%==============
%==============

clc

iris = load('example42_iris.txt');

x = iris(:,3:4);
y = 2*(iris(:,5) == 2)-1;



figure('name','输入数据图示','numbertitle','off');

plot(x(find(y==1),1)',x(find(y==1),2)','bs',x(find(y==-1),1)',x(find(y==-1),2)','ko')
axis(axis + [-0.1 +0.1 -0.1 +0.1])
legend('class one','class two',0);

⌨️ 快捷键说明

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