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

📄 gencirc.m

📁 The pattern recognition matlab toolbox
💻 M
字号:
%GENCIRC Generation of a one-class circular dataset% %   A = GENCIRC(N,S)%%  INPUT%    N  Size of dataset (optional; default: 50)%    S  Standard deviation (optional; default: 0.1)%%  OUTPUT%    A  Dataset%  % DESCRIPTION% Generation of a uniformly distributed one-class 2D circular % dataset with radius 1 superimposed with 1D normally distributed% radial noise with standard deviation S. N points are generated.% Defaults: N = 50, S = 0.1.% % SEE ALSO% DATASETS, PRDATASETS% Copyright: R.P.W. Duin, duin@ph.tn.tudelft.nl% Faculty of Applied Sciences, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlands% $Id: gencirc.m,v 1.2 2006/03/08 22:06:58 duin Exp $function a = gencirc(n,s)	prtrace(mfilename);		if nargin < 1, n =  50; end	if nargin < 2, s = 0.1; end	if (length(s) > 1)		error('Standard deviation should be scalar')	end	alf = rand(n,1)*2*pi;	r = ones(n,1) + randn(n,1)*s;	a = [r.*sin(alf),r.*cos(alf)];	a = dataset(a);		return;

⌨️ 快捷键说明

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