How to do majority voting in matlab
Show older comments
I want to do majority voting on the acquired max values from a matrix 200 by 100 in matlab and put it in 200 by 1 vector named max_index. I got the majority voting code from this link https://github.com/jsantarc/Majority-Vote-function-for-Matlab-/blob/master/majorityvote.m. I have put it in the same directory as other m files when i call the function by this line [ out ] = majorityvote(max_index), it gives me this error: Undefined function or variable 'majorityvote'. How can i solve this error?
Answers (1)
John D'Errico
on 25 Apr 2017
0 votes
What directory did you put it in? NEVER put m-files under the MATLAB root directories. Your m-files won't be seen, at least not until MATLAB is forced to recreate its cache.
2 Comments
Shelly
on 25 Apr 2017
Steven Lord
on 26 Apr 2017
What did you call the function file? Did you call it majorityvote.m?
Categories
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!