plotgenfracdimen.sci

来自「小波分解源代码」· SCI 代码 · 共 52 行

SCI
52
字号
function PlotGenFracDimen(d,q,scales)
// PlotGenFracDimen -- Plot Generalized Fractal Dimension Function
//  Usage
//    PlotGenFracDimen(d,q,scale)
//  Inputs
//    d         matrix output by CalcGenFracDimen
//    q         optional list of exponents default linspace(-2,5,61)
//    scales    optional list of scales
//
//  Side Effects
//    Display D(q,a)   
//
//  See Also
//    CWT, WTMM, CalcThermoPartition
//
//  Copyright Aldo I Maalouf

  [lhs,rhs]=argn();
	if rhs < 3,
		scales = 1;
	end	
	if rhs < 2,
		q = linspace(-2,5,61);
	end
	if isempty(q),
	    q = linspace(-2,5,61);
	end

	[nrow,ncol] = size(d);
	
	if ncol==1,
		plot(q,d);	
		xtitle('Generalized Fractal Dimension','Exponent q','D(q)');
		//xlabel('Exponent q')
		//ylabel('D(q)')
		plot2d([min(q);max(q)],[-1;2],0)
	else   	
		for k=1:nrow,
			plot(scales,d(k,:));//mtlb_semilogx(scales,d(k,:));
			//xtitle('Generalized Fractal Dimension','Scale a','D(q,a)');
			 xset("auto clear","off");//hold on;
			plot2d(scales(1)*.8,d(k,1),style=[-6]);//text
		end
		//title('Generalized Fractal Dimension')
		//xlabel('Scale a')
		//ylabel('D(q,a)')
		xtitle('Generalized Fractal Dimension','Scale a','D(q,a)')
		plot2d([(min(scales)/2);(max(scales)*2)],[-1;2],0)
		xset("auto clear","on");//hold off;
	end
	endfunction

⌨️ 快捷键说明

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