Question: loop ploting for exact and approximation function

Hello,
I need help on plotting in for loop.

> N := 10; h := 1/N;
> for i from 0 to 10 do x[i] := i*h; p1 := evalf(cos(x[i])) end do;
> f1 := [seq([x[i], p1], i = 1 .. N)];
> plot([cos(x), f1], x = 0 .. 1, y = 0 .. 1);



The above code gives me  cos x plot and line plot, but I want plot of points and cos x.



 
CTRL + Q to Enable/Disable GoPhoto.it
Please Wait...