Last active
August 29, 2015 14:16
-
-
Save tsalo/ca19fbf0a36880135116 to your computer and use it in GitHub Desktop.
Get directory of script. Add to the beginning of a script to help you load files in the same directory as the script. Makes projects more portable.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codeFile = mfilename('fullpath'); | |
[codeDir, ~] = fileparts(codeFile); | |
codeDir = [codeDir '/']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment