how to use functions from private directories
Show older comments
While I was trying to improve the performance of Excel file reading and writing, I've noticed that xlsread is using some other functions, located in a directory called ...\toolbox\matlab\iofun\private. I wrote a new function, which is composed of the code of xlsread, but it was impossible to access some functions that reside in the location above.
I tried using addpath:
addpath(fullfile(matlabroot, 'toolbox\matlab\iofun\private\'))
but I got a warning saying:
Warning: Private directories not allowed in MATLAB path
1. what's the reason for that?
2. are there any workarounds except of copying all the necessary related functions to my working directory?
Accepted Answer
More Answers (1)
Walter Roberson
on 7 Jun 2015
Edited: Walter Roberson
on 7 Jun 2015
2 votes
Private functions cannot be called directly from outside routines, except by making copies of them.
Categories
Find more on Search Path in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!