Programme matlab

Fermé
omma - 30 mai 2012 à 18:16
Bonjour,
svp je suisentrain d'écrire un g matlab juste j'éssaye d'utiliser la fonction imhist mais un probleme arrive.

voici mes lignes matlab:
img=imread('y.jpg');
histo = imhist(img,256);
figure;plot(histo);
et voici l'erreur:

??? Error using ==> iptcheckinput
Function IMHIST expected its first input, I or X, to be two-dimensional.

Error in ==> imhist>parse_inputs at 270
iptcheckinput(a, {'double','uint8','logical','uint16','int16','single'},
...

Error in ==> imhist at 57
[a, n, isScaled, top, map] = parse_inputs(varargin{:});

Error in ==> Untitled2 at 24
histo = imhist(img,256);



Merci pour votre aide