Home > functions > device > trigger_timing > vb_gamma_dist.m

vb_gamma_dist

PURPOSE ^

SYNOPSIS ^

function py = vb_gamma_dist(x,y,A)

DESCRIPTION ^

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    py = vb_gamma_dist(x,y,A)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 % log(y) = a*x + b*log(x) + c
0007 
0008 ix = find( y > max(y)*0.1);
0009 
0010 py = exp( A(1)*x + A(2)*log(x) );
0011 
0012 % y = C * py
0013 
0014 C = sum(y(ix).*py(ix)) / sum(py(ix).^2);
0015 
0016 py = C * py;

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005