bubblexmd.m

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

M
35
字号
function ret = bubblexmd ( M , v , L , alpha , x , mean , dx,dt,indicator ) # do a bubble tour of a gaussian # making plots versus x as we go # includes a mean vector # and data too if ((nargin != 8)&&(nargin != 9))    usage ("bubblex ( M , v , L , alpha , x , m ,dx,dt[,indicator-box] )");  endif	plainplot = 1 ; 	style = "-@63" ; # unusedif ( plainplot )	dxt = [ dx , dt' ] ; endifpointstyle = "@13" ; vl=[] ; 	for l=1:L	v = alpha * v + sqrt((1.0-alpha^2)) * randn(size(v))*M  ;	vtot = v + mean ;	xvtot = [ x' , vtot' ] ;	vl(l,:) = [vtot] ;	if ( plainplot )             if ( nargin == 9 ) 		gplot xvtot u 1:2 w linespoints 5 3 , dxt u 1:2 w p 1 3 , indicator u 1:2 w l 7 8 ;	    else		gplot xvtot u 1:2 w linespoints 5 3 , dxt u 1:2 w p 1 3 ;	    endif	else		plot(x,vtot,style,dx,dt,pointstyle) ;	endifendforret = vl ;endfunction

⌨️ 快捷键说明

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