comparison m-toolbox/classes/+utils/@prog/get_curr_m_file_path.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function pth = get_curr_m_file_path (m_file_name)
2 % GET_CURR_M_FILE_PATH returns the path for a mfile.
3 %
4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5 %
6 % DESCRIPTION: GET_CURR_M_FILE_PATH returns the path for a mfile.
7 %
8 % CALL: path = get_curr_m_file_path(mfilename)
9 % path = get_curr_m_file_path('explore_ao')
10 %
11 % VERSION: $Id: get_curr_m_file_path.m,v 1.1 2008/06/18 13:35:11 hewitson Exp $
12 %
13 % HISTORY: 25-06-07 Diepholz
14 % Creation
15 %
16 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
18 pth = '';
19 eval (sprintf('pth = which(''%s'');',m_file_name))
20 index = find(pth==filesep, 1, 'last');
21 pth = pth(1:index);