view m-toolbox/classes/+utils/@prog/get_curr_m_file_path.m @ 10:75007001cbfe database-connection-manager

Check for binary only objects
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

function pth = get_curr_m_file_path (m_file_name)
% GET_CURR_M_FILE_PATH returns the path for a mfile.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: GET_CURR_M_FILE_PATH returns the path for a mfile.
%
% CALL:        path = get_curr_m_file_path(mfilename)
%              path = get_curr_m_file_path('explore_ao')
%
% VERSION:     $Id: get_curr_m_file_path.m,v 1.1 2008/06/18 13:35:11 hewitson Exp $
%
% HISTORY: 25-06-07  Diepholz
%             Creation
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

pth = '';
eval (sprintf('pth = which(''%s'');',m_file_name))
index = find(pth==filesep, 1, 'last');
pth   = pth(1:index);