Home > SaliencyToolbox > callingFunctionName.m

callingFunctionName

PURPOSE ^

callingFunctionName returns the name of the calling function's calling function.

SYNOPSIS ^

function name = callingFunctionName()

DESCRIPTION ^

 callingFunctionName returns the name of the calling function's calling function.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % callingFunctionName returns the name of the calling function's calling function.
0002 
0003 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
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] = fileparts(st(3).name);
0017 end

Generated on Thu 18-Jul-2013 06:10:46 by m2html © 2005