An error occurred while trying to determine whether "dataset" is a function name.
2 views (last 30 days)
Show older comments
Iris on 6 Jan 2016
Commented: Iris on 12 Jan 2016
Hi all, I'm using a toolbox called PRTools which I have to use for a course I'm following. Somewhere I have to call a function, and then this function calls a function named 'pr_dataset'. The error I receive is the following: An error occurred while trying to determine whether "dataset" is a function name. I've read some things about not having the right license, which I don't think is the case because this function is in the toolbox that I downloaded, which just has the files in a folder on my computer. Also I've read about problems when using 'addpath' in startup.m. I use 'addpath', but not from the startupfile. I just call 'addpath' at the beginning of the script I'm writing. I also tried adding
but that doesn't seem to help. Now I've figured out that when I add the folder with the toolbox by using 'addpath', I have this problem, but when I manually add the folder by right-clicking it in the folder structure and adding it to the path, everything works fine. However I'd like to be able to use the 'addpath' because it is very inconvenient having to add the path manually all the time. Does anyone have any clue as to what is going on and how to fix this? Any help is much appreciated.
Kind regards, Iris
Usha Duddu on 8 Jan 2016
I understand that you have issues using "addpath" function. Please make sure that you do not have your custom script with the name "addpath.m". This will make sure that pre-built MATLAB script "addpath.m" is not shadowed by your custom script "addpath.m"(if you have one).
Try using "fullfile" function within "addpath" as follows-
Also execute the following MATLAb functions before using "addpath"
Hope this helps
Walter Roberson on 8 Jan 2016
An error occurred while trying to determine whether "dataset" is a function name
Notice that refers to "dataset" not "pr_dataset". So you need to %#function dataset
(and you would need to have the Statistics toolbox as that is what defines dataset)
Find more on Startup and Shutdown 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!