prex3.m
来自「模式识别工具箱,本人毕业论文时用到的,希望对大家有用!」· 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 + -
显示快捷键?