>> I=imread('lena.jpg');
>> BW1=edge(I,'sobel');
Error using ==> iptcheckinput
Function EDGE expected its first input,I,to be two-dimensional.
Error in ==> edge>parse_inputs at 541
iptcheckinput(I,{'numeric','logical'},{'nonsparse','2d'},mfilename,'I',1);
Error in ==> edge at 197
[a,method,thresh,sigma,thinning,H,kx,ky] = parse_inputs(varargin{:});