⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plot_data.m

📁 一个简单的贝叶斯分类器
💻 M
字号:
function plotdata(test,testclass)
[m,n]=size(test);
for(i=1:m)
    if(testclass(i,:)==[1,0,0])
       h=plot(test(i,1),test(i,2),'LineWidth',1,'Marker','x','Color','r');
       hold on
     end
     if(testclass(i,:)==[0,1,0])
       h=plot(test(i,1),test(i,2),'LineWidth',1,'Marker','o','Color','b'); 
       hold on
     end
     if(testclass(i,:)==[0,0,1])
       h=plot(test(i,1),test(i,2),'LineWidth',1,'Marker','*','Color','k'); 
       hold on 
      end
end

⌨️ 快捷键说明

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