|
|
Error when using knnclassify
I am trying to classify some data with the use of the function knnclassify. However i got the following error when i use the m-file : ??? Error: File:
knnclassify.m Line: 119 Column: 1 The input character is not valid in MATLAB statements or expressions.
class = knnclassify(sample, training , group); is the commnad i use where sample is a matrix 2000x20 training 2000x20 and group 2000x1. Any idea about what is wrong in my case????
|
|
0
|
|
|
|
Reply
|
snake__plissken (4)
|
7/17/2012 2:33:11 PM |
|
"Snake " <snake__plissken@hotmail.com> wrote in message
news:ju3t36$k7u$1@newscl01ah.mathworks.com...
> I am trying to classify some data with the use of the function
> knnclassify. However i got the following error when i use the m-file : ???
> Error: File:
>
> knnclassify.m Line: 119 Column: 1 The input character is not valid in
> MATLAB statements or expressions.
>
> class = knnclassify(sample, training , group); is the commnad i use where
> sample is a matrix 2000x20 training 2000x20 and group 2000x1. Any idea
> about what is wrong in my case????
Show the group line 118-120 of knnclassify.m:
dbtype knnclassify.m 118:120
Also show the group which knnclassify function you're using:
which -all knnclassify
and the version of MATLAB and Statistics Toolbox you're using:
ver % Snip out the license number and all lines except MATLAB and Statistics
Toolbox
My guess is that you have a different version of knnclassify.m on your path
and/or you accidentally typed something into that function when you had it
open in the Editor.
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|
|
0
|
|
|
|
Reply
|
slord (13272)
|
7/17/2012 4:36:12 PM
|
|
|
1 Replies
34 Views
(page loaded in 0.049 seconds)
|
|
|
|
|
|
|
|
|