Erratic behavior sqrt(1-cos(x)**2) near pi

Help
HFR
2011-11-18
2013-02-10
  • HFR
    HFR
    2011-11-18

    I'm trying to plot sqrt(1-cos(x)**2) Obviously this function has value 0 at pi. However, gnuplot doesn't handle this correctly.

    How can I get a proper graph of this function?

    Thanks,

    Harrie.

     
  • I suggest reading `help set samples`. You could also have a look at prob.dem in the demos directory.

     
  • HFR
    HFR
    2011-11-18

    Thanks,

    I found out that after setting the sampling rate to 1000, the function was plotted correctly.