Cannot find an exact (case-sensitive) match for '~~'

I wrote the function, M-file. It makes a variable which save histogram of input arguments. And, I saved M-file at C:\Program Files\MATLAB\R2012a\bin
It is first part of m-file. function hist = ExHist( img )
so, In command window, I made a variable which saves image information. inImg = imread('~~~~~');
and, His = Exhist( inImg );
But, it occurs error.
Cannot find an exact (case-sensitive) match for 'Exhist'
The closest match is: ExHist in C:\Program Files\MATLAB\R2012a\bin\ExHist.m
I don't know how to do..

 Respuesta aceptada

the cyclist
the cyclist el 2 de Mzo. de 2015
Editada: the cyclist el 2 de Mzo. de 2015
MATLAB uses the filename to call the function, not the name inside the function itself.
Use
His = ExHist(inImg);
It's best practice to name the function name inside the function match the filename, to avoid this confusion. (You probably have a little yellow warning inside the function, telling you that you violated that.)

1 comentario

Also, don't do this:
function hist = ExHist( img )
because hist is the name of a built in function. Don't destroy it by making it the name of your return variable - that's bad practice even though technically it's allowed.

Iniciar sesión para comentar.

Más respuestas (1)

nadia oulefki
nadia oulefki el 16 de Abr. de 2018

0 votos

this is my error cannot find an exact (case-sensitive) match for function the closest match is:functionin C:\program files\matlab\R2013a\toolbox\matlab\lang\function.m
pleaaase any one help me

Categorías

Más información sobre MATLAB Report Generator en Centro de ayuda y File Exchange.

Preguntada:

el 2 de Mzo. de 2015

Respondida:

el 16 de Abr. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by