MATLAB: Error in edge command

edge commandImage Processing ToolboxMATLABsyntax

Hello,
When I run the following code I get this message: ??? [BW,threshold]=edge(img,’zerocross’,[],'Laplacian'); | Error: The input character is not valid in MATLAB statements or expressions.
Could someone help me?
Thanks in advance
%%%%%% code%%%%%% clc;close all;clear *;
Laplacian=[1 1 1; 1 -8 1; 1 1 1];
img=double(imread('C:\Users\manolis\Desktop\ask4 sagkriwths\clown.tif')); [BW,threshold]=edge(img,’zerocross’,[],'Laplacian'); figure;imshow(img,[]) figure;imshow(BW)
disp(threshold)

Best Answer

You have the wrong kind of quotes around zerocross and should not have quotes around Laplacian. Try this:
[BW,threshold]=edge(img,'zerocross',[],Laplacian);