coeff = [8 3 3]; %%poly_function
A = []; N=9;
for ix = 1:N;
c = 0;
for i = 1:3
temp=1;
for k=1:i
temp=mod(temp*ix,N);
end
c = c + mod(coeff(i)*temp ,N);
c = mod(c, N);
if c == 0; c = N; end
end
A = [A c]; %%A = [5 7 6 2 4 3 8 1 9]
end
I'm a bit confused about how this loop works to get result A. Why is A defined as A= [ ]; and in the end are A and c merged?
Could you please help me understand the working of this code?