bubblex.m

来自「这是用matlab编写的支持向量机的函数工具箱」· M 代码 · 共 35 行

M
35
字号
function ret = bubblex ( M , v , L , alpha , x , indicator ) # do a bubble tour of a gaussian # making plots versus x as we go  if ((nargin != 6)&&(nargin != 5))    usage ("bubblex ( M , v , L , alpha , x [,indicator] )");  endif#if (nargin != 6)#	plainplot = 1 ; #	style = "-@63" ; # unused#else #	plainplot = 0 ; #endif	plainplot = 1 ; 	style = "-@63" ; # unusedpointstyle = "@13" ; vl=[] ; 	for l=1:L	v = alpha * v + sqrt((1.0-alpha^2)) * randn(size(v))*M  ;	xvtot = [ x' , v' ] ;	vl(l,:) = [v] ;	if ( plainplot ) 	    if ( nargin==6)		gplot xvtot u 1:2 w linespoints 6 3 , indicator u 1:2 w l 7 8 ;	    else		gplot xvtot u 1:2 w linespoints 6 3 ;	    endif	else		plot(x,v,style)	endifendforret = vl ;endfunction

⌨️ 快捷键说明

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