Undefined function or variable 'in'.

1 回表示 (過去 30 日間)
wisnu
wisnu 2013 年 5 月 5 日
hello.. iam stuck over here on function gabor
function [out1 out2] = fn_gabor(c)
alpha = 1/sqrt(2);
t=1;
for teta = pi/8:pi/8:pi;
for j = 2:5;
for x = -8:8;
for y = -8:8;
h = exp((-alpha^(2*j))*(x^2 + y^2)/2);
HI (x+9,y+9)= h;
Re = cos (pi*(alpha^j)*(x*cos(teta)+ y*sin(teta)));
RI (x+9,y+9)= Re;
Im = sin (pi*(alpha^j)*(x*cos(teta)+ y*sin(teta)));
II (x+9,y+9)= Im;
end;
end;
Rh = HI*RI;
Rh;
Ih = HI*II;
Ih;
R = conv(in,Rh); %%%ERROR IN HERE
I = conv(in,Ih);
% Normalisasi
Ro = (R)/(max(max(R)));
Roa = mean (Ro);
Roav = mean (Roa);
Io = (I)/(max(max(I)));
Ioa = mean (Io);
Ioav = mean (Ioa);
% Magnitude hasil konvolusi
out = sqrt (Ro*Ro' + Io*Io');
outfil(t) = sqrt (Roav*Roav + Ioav*Ioav);
t = t + 1;
end;
end;
out1 = out;
out2 = outfil;
please help.. thank you..

採用された回答

John Doe
John Doe 2013 年 5 月 5 日
編集済み: John Doe 2013 年 5 月 5 日
Well the reason is that you haven't defined 'in' anywhere.
My guess is that the input variable should be named 'in'. You haven't used the input 'c' anywhere in your function.
  1 件のコメント
wisnu
wisnu 2013 年 5 月 5 日
so supposed to replace the variable 'in' in the code is? because function 'conv' is a vector

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssembly についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by