Not enough input arguments. Need help please.

Again with the same problem, I can't seem to find the solution to this problem. Can anyone find the solution to this problem.
function [kurtosis_1] = feature1(data,fs)
data=data/max(abs(data));
cutoff=100;
b = fir1(100,2*cutoff/fs,'high',chebwin(101));
data=conv(data,b);
kurtosis_1= kurtosis(data);
Error using feature1 (line 3)
Not enough input arguments.

5 comentarios

Image Analyst
Image Analyst el 29 de Abr. de 2015
How are you calling feature1()? You aren't just clicking on the green "Run" triangle to run it without supplying any input arguments are you?!?! Please copy ALL THE RED TEXT, not just a small part of it like you did.
Muhammad Sufiyan
Muhammad Sufiyan el 29 de Abr. de 2015
What red text? Sorry, i'm not too good at this.
Stephen23
Stephen23 el 29 de Abr. de 2015
"The red text" means the complete error message that is displayed in the command window, because it include other important information for us, such as the calling sequence of the functions. So please copy and paste all of the red error message and paste it in a new comment here.
Muhammad Sufiyan
Muhammad Sufiyan el 29 de Abr. de 2015
Error using feature1 (line 3) Not enough input arguments.
It only appears this after I click the green 'run' button. Nothing else. How?
Jan
Jan el 4 de Mayo de 2015
Please, Muhammad, be so kind and tell us, which is the "line 3". It cannot be "cutoff=100;", so I guess that there is an empty line anywhere? What is "data"? Is it a function handle?

Respuestas (2)

Stephen23
Stephen23 el 4 de Mayo de 2015
Editada: Stephen23 el 4 de Mayo de 2015

2 votos

The green button on the toolbar runs code, but does not (by default) provide any arguments. You can use its default behavior for running:
  • functions that do not require any input arguments
  • scripts
Or you can alter the button's behavior by clicking Run just under the button and defining the code to get run:
Christiaan
Christiaan el 29 de Abr. de 2015
Dear Muhammad,
It seems that the function "feature1" needs more then two arguments. If you type in the MATLAB prompt:
>> edit feature1.m
You find the source code of feature1.m. Here you can see how many (and which) additional arguments you need.
Kind regards, Christiaan

2 comentarios

Muhammad Sufiyan
Muhammad Sufiyan el 29 de Abr. de 2015
That is the source code of feature1.m, and i'm not too sure what additional arguments need to be added.
Christiaan
Christiaan el 4 de Mayo de 2015
Dear Muhammad,
Since feature1.m is a hand made code, please copy the source code of feature1.m in this forum. How this can be done, is described in my answer from before.
Kind regards, Christiaan

La pregunta está cerrada.

Etiquetas

Preguntada:

el 29 de Abr. de 2015

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by