i am working on a code which gives me following error. i donno whr i am goin wrong..can somebody help me please ??? Subscript indices must either be real positive integers or logicals.
Error in ==> gabor_fn at 23
G(fix(Sx)+x+1,fix(Sy)+y+1) = exp(-nf*pi*((xPrime/Sx(yPrime/Sy).^2)).*cos(2*pi*f*xPrime);
my code is
Sx=10;
Sy=8;
f=0.1;
nf=1;
k=1;
i=1;
theta =(i*15*pi)/180;
N = 12;
x = -fix(Sx):fix(Sx)
y = -fix(Sy):fix(Sy)
[rowsx colsx numberOfColorChannelsx] = size(x);
% Get size of existing image B.
[rowsy colsy numberOfColorChannelsy] = size(y);
% See if lateral sizes match.
if rowsy ~= rowsx || colsx ~= colsy
% Size of B does not match A, so resize B to match A's size.
y = imresize(y, [rowsx colsx]);
end
xPrime = x * cos(theta) + y * sin(theta);
yPrime = y * cos(theta) - x * sin(theta);
G(fix(Sx)+x+1,fix(Sy)+y+1) = exp(-nf*pi*((xPrime/Sx).^2+
(yPrime/Sy).^2)).*cos(2*pi*f*xPri0me); //THIS IS THE LINE WHERE I GET ERROR AND PARTICULARLY **G(fix(sx)+x+1,fix(sy)+y+1)**