MATLAB: I have an polynomial f(x) = 4x^5 + 5x^4 + 2x^3 +2x^2 +3x. And x ranges from {0 to 63}. How to code this so I can display answer corresponding to every value of x.

for loop

Could you help me?

Best Answer

p=[4 5 2 2 3 0];
x0=1;
polyval(p,x0);
evaluates your polynomial at x0=1.
Best wishes
Torsten.