prex3.m

来自「matlab 模式识别工具包 希望能对你们有用」· M 代码 · 共 21 行

M
21
字号
%PREX3 PRTOOLS example of multi-class classifier plothelp prex3echo onglobal GRIDSIZEgs = GRIDSIZE;GRIDSIZE = 100;						% generate 2 x 2 normal distributed classesa = +gendath(20);		% data onlyb = +gendath(20);		% data onlyA = [a; b + 5];			% shift 2 over [5,5]lab = genlab([20 20 20 20],[1 2 3 4]');% generate 4-class labelsA = dataset(A,lab);		% construct datasethold off; 				% clear figurescatterd(A,'.'); drawnow;% make scatter plot for right sizew = qdc(A);				% compute normal densities based quadratic classifierplotd(w,'col'); drawnow;% plot classification regionshold on;scatterd(A);			% redraw scatter plotecho offGRIDSIZE = gs;

⌨️ 快捷键说明

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