Write a MATLAB function g=shifted(f,s) which computes the coefficients of the shifted form around the shift s from the coefficients f of the standard from.
Ok, this is my progess:
function g=shifted(f,s)
n=length(f);
for i=1:n
[q,r]=deconv(f,[1,-s]);
g=r
[q,r]=deconv(q,[1,-s]);
g=r
[q,r]=deconv(q,[1,-s]);
g=r;
end
There are many things that are wrong with this.
1) I do not know how to start or end the for loop. so i keep repeating
what i wanted to do one by one. it wont work for larger polynomials.
2) i get r one by one and i need it to give me one last row vector with
all the coefficients.
Please let me know how can i generalize this. thanks