フィルターのクリア

can anyone help me in solving this function error?

1 回表示 (過去 30 日間)
Vinay Kumar
Vinay Kumar 2014 年 10 月 15 日
コメント済み: Vinay Kumar 2014 年 10 月 16 日
I have called a function as follows:
function[z]=direction(img,blocksize)
but I am getting this error.
Error in direction2 (line 2) [w,h] = size(img);
Output argument "z" (and maybe others) not assigned during call to "C:\Documents and Settings\Administrator\My Documents\MATLAB\direction2.m>direction2".
  2 件のコメント
Geoff Hayes
Geoff Hayes 2014 年 10 月 15 日
Vinay - put a breakpoint at line 2 of the direction2.m file and re-run your code. When the debugger stops at this line, check out img. What is this object - an array, scalar, struct, empty or..? There must also be more to the error message than what you have shown, in particular the type of error. Perhaps you have defined a local variable as size and so that is causing confusion with the built-in MATLAB function size. What is the function signature for direction2?
Vinay Kumar
Vinay Kumar 2014 年 10 月 16 日
ya thank you Geoff Hayes for your valuable answer. Now I will try to sort it out. Actually direction2.m is a function for orientation field estimation(Fingerprint Recognition).

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

採用された回答

Roger Wohlwend
Roger Wohlwend 2014 年 10 月 15 日
The problem is that in your function you don't use your output variable z. You don't assign a value to z.
  1 件のコメント
Vinay Kumar
Vinay Kumar 2014 年 10 月 16 日
Thank you Roger Wohlwend.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by