Possible statistics toolbox problem. MatLab doesn't seem to be able to find the toolbox even after setting a path to it after the first error.

6 views (last 30 days)
I'm new to MatLab and I don't know much about it and I'm trying to run some data through a pipeline and I keep getting errors and I have figured them all out aside from this one. It seems like a simple problem but I'm not sure why I can't get it resolved. I have the statistics toolkit and I even set the path to the toolbox (correctly I think) but I thought it should find the toolboxes automatically. I tracked the problem down to this function. Here is the line I tried to run and the error I get:
random('Normal',0,1,2,4) Undefined function 'eml_is_const' for input arguments of type 'char'.
Error in random (line 9) coder.internal.assert(eml_is_const(name),'Coder:toolbox:InputMustBeConstant','NAME');
I'm not sure what's going wrong. It seems like it's not finding the statistics toolbox because this is just a basic function defined in the code in the toolbox. Like I said, it seems like a silly problem but I can't seem to get around it. Any help would be appreciated!

Accepted Answer

Star Strider
Star Strider on 4 Jun 2014
Type this in the Command Window:
which random -all
If you get any results that aren’t in the:
C:\Program Files\MATLAB\R2014a\toolbox\
directory, you have a function that is ‘shadowing’ random. Rename it, or move it out of MATLAB’s path.
  4 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!