function P = Fillter(K)
dem=0;
%F=zeros(10001,2);
F(1,1)=K(1,1);
F(1,2)=K(1,2);
t=length(K(:,1));
for i=2:1:t
if (K(i,1)~=K(i-1,1))
F(i-dem,1)=K(i,1); F(i-dem,2)=K(i,2);
else
dem=dem+1;
end
end
P=F;
end
Line : F(1,1)=K(1,1); Not enough input arguments.
How to fix that?

 Respuesta aceptada

the cyclist
the cyclist el 5 de En. de 2021

0 votos

How are you calling the function? If you call it like this ...
Fillter()
then you will get that error because Fillter is expecting one input, and it is receiving zero inputs.

2 comentarios

Stefania Rauta
Stefania Rauta el 6 de En. de 2021
that's not the problem :(
the cyclist
the cyclist el 6 de En. de 2021
You didn't answer the question, though. How are you calling the function? Can you upload a complete set of code we can run, that gives the error? Because if I call it as follows
Fillter([1 2 3 4])
then the code runs to completion with no error.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 5 de En. de 2021

Comentada:

el 6 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by