lab6 - Doug Rivas ME 218 Lab 6 M 5- 7 6.1 # include...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Doug Rivas ME 218 Lab 6 M 5- 7 6.1 # include <stdio.h> # include <math.h> # define Pi 3.141592654 double alpha; double beta; double Freudenval; double Freud; double Freudenstein(double alpha, double beta); int main (void) { printf("Alpha Beta Error\n"); alpha= 1.308996939; beta= 0; while(beta <=360) { alpha= 1.308996939; Freudenval= Freudenstein(alpha, beta); printf("%lf %lf %lf\n", alpha, beta, Freudenval); beta= beta + 18; } } double Freudenstein(double alpha, double beta) { int a= 6; int b= 18; int c= 15; float d= 15.5;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
alpha= 1.308996939; Freudenval= pow(a,2)- pow(b,2)+ pow(c,2)-pow(d,2) - 2*a*c*sin(alpha)*sin(beta/180*Pi)- 2*a*c*cos(alpha)*cos(beta/180*Pi) - 2*a*d*cos(alpha) +2*c*d*cos(beta/180*Pi); return Freudenval; } 6.2 Initial Bracket Choice is based on output from part 1, we can clearly see that there is a root between beta=288 and beta= 306, so an initial lower bracket guess towards the bottom of this range will yield the root. Output:
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/07/2008 for the course ME 218 taught by Professor Unknown during the Spring '08 term at University of Texas at Austin.

Page1 / 4

lab6 - Doug Rivas ME 218 Lab 6 M 5- 7 6.1 # include...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online