Borrar filtros
Borrar filtros

can u explain the logic of this program.while am running the program i got the error like this"Error using alphatrim (line 3) Not enough input arguments.""can u suggest the solution

2 visualizaciones (últimos 30 días)
function f = alphatrim(g,m,n,d)
% implements a alpha-trimmed mean filter.
inclass = class(g);
g = im2double(g);
f = ordfilt2(g,1,ones(m,n),'symmetric');
for k = 1:d/2
f = imsubstract(f,ordfilt2(g,k,ones(m,n),'symmetric'));
end
for k = (m*n + (d/2) + 1):m*n
f = imsubstract(f,ordfilt2(g,k,ones(m,n),'symmetric'));
end
f = f/(m*n - d);
f = changeclass(inclass,f);

Respuestas (2)

ES
ES el 22 de En. de 2014
Kindly format the code while posting using the {}Code button at the top of the window you type in.
As to the error you get, did you run the script from the editor using the play button or pressing f5? In that case the input arguments(i.e., g,m,n,d) are not passed to the function.
You have to run it from your command window by calling
f = alphatrim(g,m,n,d)
after specifying the values for g,m,n and d.

Nitin
Nitin el 22 de En. de 2014
As the error mentions, please check you input arguments, g,m,n,d.

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by