function with xmin causes error
Mostrar comentarios más antiguos
I am supposed to create xmin as a function but no matter what I try MatLab always displays:
Error using minfun
Too many input arguments.
My code looks like this:
function xmin=minfun(x)
n=length(x);
xmin=x1;
for k=2:n
if (x(k)<xmin)
xmin=x(k);
end
end
end
I really have no idea where I made a mistake...
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Digital Filtering en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!