Code error "Not enough input arguments" Anyone help me, Thanks in Advance
Show older comments

I have PSO Algorithm code in Matlab with UCI breast cancer dataset feature selection with PSO and classification with Guassian kernal but having some error in code.I attached Code and error image is also written in PDF file also check this file for solve issue.I am student and new in matlab. please someone help me to solve this issue. I am very Thankful to for this act.
Answers (1)
Fangjun Jiang
on 30 Oct 2017
Edited: Fangjun Jiang
on 30 Oct 2017
0 votes
The function expects three inputs, (s, h, data). You didn't provide any. That is the error.
It looks like you have some data in the workspace, so try
FeatureSelectionCost(s,h,data)
6 Comments
Muhammad Bilal
on 30 Oct 2017
Fangjun Jiang
on 30 Oct 2017
The error is not from where you marked. The error is that you didn't provide inputs when running the function. Run
FeatureSelectionCost(s,h,data)
Muhammad Bilal
on 30 Oct 2017
Walter Roberson
on 31 Oct 2017
The error is not in the file. You tried to run the function from the command line, and when you did that you did not pass in any arguments.
You also did not include a copy of your code, so people would not have been able to correct your code for you.
In one of your other Questions I showed some of the errors in your GaussianKernel code.
Muhammad Bilal
on 31 Oct 2017
Walter Roberson
on 31 Oct 2017
You need to fix the problems I showed in your other question.
Categories
Find more on Particle Swarm 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!