callingFunctionName returns the name of the calling function's calling function.
0001 % callingFunctionName returns the name of the calling function's calling function. 0002 0003 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2007 0004 % by Dirk B. Walther and the California Institute of Technology. 0005 % See the enclosed LICENSE.TXT document for the license agreement. 0006 % More information about this project is available at: 0007 % http://www.saliencytoolbox.net 0008 0009 function name = callingFunctionName() 0010 0011 st = dbstack; 0012 0013 if (length(st) < 3) 0014 name = ''; 0015 else 0016 name = basename(st(3).name); 0017 end