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

📄 gendatr.m

📁 The pattern recognition matlab toolbox
💻 M
字号:
%GENDATR Generation of regression data%%      A = GENDATR(X,Y)%% INPUT%   X    data matrix%   Y    target values%% OUTPUT%   A    regression dataset%% DESCRIPTION% Generate a regression data from the data X and the target values Y.%% SEE ALSO%  SCATTERR, GENDATSINC% 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 a = gendatr(x,y)if nargin<2	y = 1;endif nargin<1	x = 0;end% check the sizes[n,dim] = size(x);if length(y)~=n	error('Size of X and Y do not match.');end% store it in the dataset:a = dataset(x);a = setlabtype(a,'targets',y);if ~isa(x,'dataset')	fl = {};	for i=1:dim		fl{i} = sprintf('x_%d',i);	end	a = setfeatlab(a,fl);endreturn

⌨️ 快捷键说明

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