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

📄 plotg3.m

📁 ddtool,实现one class classification.包括gaussian 模型
💻 M
字号:
%PLOTG Plot the function values z on a 2D grid%%    H = PLOTG(GRID,Z)%% Plot the function values given in Z on the 2D grid. The GRID is a% 2xN dataset, where N is nxn. Vector Z has therefore also length N.%%    H = PLOTG(GRID,Z,HGT)%% By setting HGT one contour at height HGT can be plotted.%% When you already have a PRTools mapping w, please use plotw(w).%% see also: makegriddat, gendatgrid, plotw% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org% Faculty EWI, Delft University of Technology% P.O. Box 5031, 2600 GA Delft, The Netherlandsfunction h = plotg(grid,z,nrc)if nargin<3	nrc = [];end% I want to be able to handle datasets, but don't have the burden:if isdataset(grid)	grid = +grid;endif isdataset(z)	z = +z;end% First determine the sizes of the grid:lx = length(find(grid(:,2)==grid(1,2)));ly = size(grid,1)/lx;% and extract the exact x and y positions:x = grid(1:ly:end,1);y = grid(1:ly,2)';% See if z has the right sizeif (size(z,2)>1)	error('Data z does not have appropriate size');endhold on;%h = surface(x,y',reshape(+z,ly,lx));h = mesh(x,y',reshape(+z,ly,lx));hold on;if ~isempty(nrc)	[c,h] = contour3(x,y,reshape(+z,ly,lx),[nrc nrc],'r');endview(3);if nargout==0	clear h;endreturn

⌨️ 快捷键说明

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