Ch (computer programming): Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 88:
 
 
To plot a sine wave:
== References ==
 
#include <math.h>
#include <chplot.h>
int main() {
int numpoints = 36;
array double x[numpoints], y[numpoints];
 
linspace(x, 0, 360); // assign x with values from 0 to 360 linearly
y = sin(x*M_PI/180);
plotxy(x, y, "Ch plot", "xlabel", "ylabel");
}
 
== External links ==