plotmomentgenfun.sci

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

SCI
58
字号
function PlotMomentGenFun(tau,q)
// PlotMomentGenFun -- Display Moment Generating Function
//  Usage
//    PlotMomentGenFun(tau,q)
//  Inputs
//    tau       matrix a by nq of ``Moment Generating Func''
//    q         optional list of exponents default linspace(-2,5,61)
//
//  Description
//    tau(q) = Slope [ log(z(q,a))  versus log(a) ]
//
//  Side Effects
//    Displays a plot of tau(q) versus q
//
//  See Also
//    CalcMomentGenFun
//
//  Copyright Aldo I Maalouf
        
  [lhs,rhs]=argn();
	if rhs < 2,
	    q = linspace(-2,5,61);
	end
	if isempty(q),
		q = linspace(-2,5,61);
	end

        m=max(size(tau));
        n=max(size(q)); 
        //u=max(m,n);
         //if m~=n & m~=1 & n~=1
         // warning('Vectors must be the same lengths!');   
          
          	    
	   if n==1
	      for i=1:m
	        plot2d(q,tau(i),style=[-1]);//mtlb_plot(q,tau,'b+')
	      end
	   elseif m==1
	      for i=1:n
	        plot2d(q(i),tau,style=[-1]);
	      end  
	   elseif m==n
	      for i=1:n
	        plot2d(q(i),tau(i),style=[-1]);
	      end  
	   else
	      warning('Vectors must be the same lengths!');     
	   end
	  
	//end      
	
	xtitle('Moment Generating Function','q','tau(q)');
	//xlabel('q')
	//ylabel('tau(q)')
	endfunction
	

⌨️ 快捷键说明

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