Mercurial > repos > public > sbplib
changeset 612:77db2ef14191 feature/grids
Add function for finding the path of sbplib
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 11 Oct 2017 15:43:31 +0200 |
parents | 5a7f7f206594 |
children | 6490b5f950fb |
files | sbplibLocation.m sbplibVersion.m |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbplibLocation.m Wed Oct 11 15:43:31 2017 +0200 @@ -0,0 +1,4 @@ +function location = sbplibLocation() + scriptname = mfilename('fullpath'); + [location, ~, ~] = fileparts(scriptname); +end
--- a/sbplibVersion.m Mon Oct 09 10:51:48 2017 +0200 +++ b/sbplibVersion.m Wed Oct 11 15:43:31 2017 +0200 @@ -1,11 +1,10 @@ % Prints the version and location of the sbplib currently in use. function sbplibVersion() - scriptname = mfilename('fullpath'); - [folder,~,~] = fileparts(scriptname); + location = sbplibLocation(); name = 'sbplib (feature/grids)'; ver = '0.0.x'; fprintf('%s %s\n', name, ver); - fprintf('Running in:\n%s\n',folder); + fprintf('Running in:\n%s\n', location); end \ No newline at end of file