Not enough input arguments

2 visualizaciones (últimos 30 días)
Priya Arasu
Priya Arasu el 6 de En. de 2017
Editada: Stephen23 el 6 de En. de 2017
I have started to use MATLAB, so I am not sure about the error. When I run the attached matlab script file, I get the following error.
>> predictClassRFWithScores
Error using predictClassRFWithScores (line 22)
Not enough input arguments.
Any insight about the error would of great help. Thank you

Respuestas (1)

Stephen23
Stephen23 el 6 de En. de 2017
Editada: Stephen23 el 6 de En. de 2017
predictClassRFWithScores is a function, not a script. It requires three inputs. However when you call it you are not providing it with any inputs. It is just like if you call this
sin()
and then complained that you are not getting any output from the sine function. What do you expect MATLAB to do, invent some values to use?
Possibly you are clicking the green button in the ribbon. Don't. Call the function from the command line, providing it with its required input arguments. Very basic things like calling functions and defining variables (that you can use as arguments) are explained in the introductory tutorials:

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by