www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/xregrbfcentersel.m

    function [x,sel] = xregrbfcentersel(p,x)
%XREGRBFCENTERSEL select centers from candidates
%
% [x,sel] = xregrbfcentersel(p,x)
% This routine returns a repeatable non regular selection of points for candidate
% centers. The random number generator is seeded to 0 to achieve this.

%  Copyright 2007-2008 The MathWorks, Inc. 


s = RandStream('swb2712','seed',0);

n = size(x,1);
randint = randperm(s,n);

sel = randint(1:p);

% select centers
x = x(sel,:);