フィルターのクリア

why do I get the error ''Attempt to execute SCRIPT edge as a function:''?

11 ビュー (過去 30 日間)
ramin asadi
ramin asadi 2016 年 6 月 2 日
コメント済み: Walter Roberson 2024 年 7 月 19 日 5:18
I want to edge a gray scale image and I receive this error: ''Attempt to execute SCRIPT edge as a function:'' can any one help me?

回答 (2 件)

Walter Roberson
Walter Roberson 2016 年 6 月 2 日
Use
which edge
and that will tell you the location of the edge.m file that you created; you will need to delete or rename that edge.m to avoid interfering with using MATLAB's edge() routine.

SHINO
SHINO 2024 年 7 月 19 日 4:59
編集済み: Walter Roberson 2024 年 7 月 19 日 5:14
dge
Execution of script edge as a function is not supported:
E:\matlab program\edge.m
Error in edge (line 4)
BW1 = edge(I,'Canny');
  1 件のコメント
Walter Roberson
Walter Roberson 2024 年 7 月 19 日 5:18
You named your script edge.m but you are trying to call the edge() function inside the script. Within your edge.m script, edge gets resolved to the edge.m that you are executing. But your edge.m script cannot be called as a function, so you get an error.
You need to rename E:\matlab program\edge.m to something else that does not conflict with built-in MATLAB functions.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by