MATLAB Answers


Error in determining the root folder

Asked by Bahar Anvari on 5 Nov 2018
Latest activity Answered by Sebastian Castro on 7 Nov 2018
Hi ,
I'm trying to use determineRootFolder but Im getting an error: [Excel_File_Name,templatePath,outputFilePath] = determineRootFolder({Excel_File_Name,templatePath,outputFilePath},{'New Volume','New Volume','New Volume'});
How can I use determineRootFolder properly?
Thanks, Bahar


What is determineRootFolder and what is your error? If you want a quick answer to your question give people the information they need to help!
determineRootFolder appears to be Java, not MATLAB or have java implementations, which appear to do different things, and which do not appear to have the same function signature as you are using.
I do not find a MATLAB function by that name.

Sign in to comment.

1 Answer

Answer by Sebastian Castro on 7 Nov 2018

If you want the name of the current folder
>> folderName = pwd;
If you want the name of the file containing the MATLAB script/function itself:
>> folderName = fileparts(mfilename('fullpath'));
- Sebastian


Sign in to comment.