// Demonstrates the usage of the fplotxy() function. // Print out a sine wave with appropriate labels and grid range. #include <math.h> #include <chplot.h> int main() { double x0 = 0, xf = 2; int num = 200; /* local function to be plotted */ double func2(double x) { return 1/((x-0.3)*(x-0.3)+0.01) + 1/((x-0.9)*(x-0.9)+0.04) - 6; } fplotxy(func2,x0,xf,num); }