i have the following error in my matlab function code:
??? Subscript indices must either be real positive integers or logicals.
Error in ==> AFA at 15
M(k,j) = mean(T(i:sze,j));
here is the part of the code where the problem is :
sz =size(T);
lim = sz(2) - ordre;
M = zeros(sz(1),sz(2));
r= 0;
for j=1:sze,
k = 1;
for i=1:lim,
M(k,j) = mean(T(i:i+ordre,j));
k = k + 1;
end
for i=lim+1:sz(2),
M(k,j) = mean(T(i:sz(2),j));
k = k + 1;
end
end
The following works for me without error
end