Computer Science > STUDY GUIDE > University of Ottawa GNG 1106 ACTUAL PROJECT.c (All)
/*------------------------------------------------------------------ File: template.c Description: Template that demonstrates creating a plot. ------------------------------------------------------ ... ---------------*/ #include <stdio.h> #include <gng1106plplot.h> // provides definitions for using PLplot library #include <math.h> #include <float.h> // Some definitions #define NUM_POINTS 100 // Number of points used for plotting #define XINC 0.1 // for incrementing x when computing points #define X_IX 0 // Row index for storing x values #define FX_IX 1 // Row index for storing f(x) values #define pi M_PI #define ZE 1e-6 //value for zero #define NUMROOTS 5 typedef struct { double dmin, dmax, rough, dens, flow, visc, re, cross, fric; double gmin, gcent, gmax, root[NUMROOTS]; double xmin, xmax, xcent; int ctr; }PARAMETERS; // function prototypes void input(PARAMETERS *); double func(double, PARAMETERS *); void plot(int numPoints, double points[][numPoints]); double getMinDouble(double [], int); double getMaxDouble(double [], int); void checkRe(PARAMETERS *); void findroot(PARAMETERS *); void FILEcreate(); void FILEopen(PARAMETERS *); void FILEsave(PARAMETERS *); int selectinputvalues(PARAMETERS *); /*--------------------------------------------------------------------- Function: main [Show More]
Last updated: 3 years ago
Preview 1 out of 7 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jun 06, 2021
Number of pages
7
Written in
All
This document has been written for:
Uploaded
Jun 06, 2021
Downloads
0
Views
64
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·