"James " <
jke...@gmail.com> wrote in message
news:l4rd6a$h66$1...@newscl01ah.mathworks.com...
> "Steven_Lord" <
sl...@mathworks.com> wrote in message
> <kqs33s$c1l$
1...@newscl01ah.mathworks.com>...
>>
>>
>> <
varuns...@gmail.com> wrote in message
>> news:2efa8648-6a24-44b3...@googlegroups.com...
>> > Hello
>> > i m facing the same problem. when m gng to run the code then got dis
>> > msg in command window (??? Undefined function or method 'histogram'
>> > for input arguments of type 'char'.) What should i do???
>>
>> There's no function named histogram in MATLAB or any of the toolboxes.
>> Did you mean to call HIST instead?
>>
>>
http://www.mathworks.com/help/matlab/ref/hist.html
>>
>> --
>> Steve Lord
>>
sl...@mathworks.com
>> To contact Technical Support use the Contact Us link on
>>
http://www.mathworks.com
>
> It means that you're not in the right folder, i.e. the folder that the .m
> file is in.
That's one possible meaning. It could also mean that you mistyped the file
name, or that you are trying to use a function from a toolbox that you don't
have installed, or that you are trying to use a function that's only defined
for certain types of variables on a different type of variable (for
instance, using something that's only defined for symbolic variables on
numeric variables.)
> It, like all of Matlabs Byzantine error messages, is convoluted.
Some of the error messages could be improved, and some are very detailed or
specific. But convoluted? I've seen much, much, MUCH worse in other
languages (like using some templatized class from the Standard Template
Library incorrectly in C++ -- I've seen the HTML source for web pages and
some page-long XML files that used fewer greater-than and less-than signs
than the six or seven lines of errors that were thrown in one or two of
those cases.)
> I've been programming in matlab on and off for 2 years now and still find
> that there error messages are like reading hieroglyphics. Perhaps there
> will be a watershed moment where I start to understand what they mean, but
> until that day, I will be grumpy about it.
If there are specific messages that you feel don't give you enough
information about the source of the problem, or that you have a suggestion
for how to improve, please send your suggestions to Technical Support so
that they can report them to the development staff.
> Regardless, here's how you fix: just look at the current folder section of
> Matlab's gui window, find the folder where the .m file you need to use is
> and double click that folder. There, now you're in the right folder.
That's one possible solution that would resolve one of the possible causes
of that error. You could also change your call to call the correct function
(as I suggested, I believe they wanted to call HIST) as a solution to a
different possible cause, which I believe is the more common cause of this
error.