c for enginner homework
Homework must be fully commented and with output
1.
(Writing to a file).
A damped sine wave is a sinusoidal function whose amplitude approaches zero as
time increases.
Write a program that will generate a data file containing 100 value points (Y(t)) from a damped sine function. Make use of the math library functions for the exponent and sine calculations. Use the following formula for time: t = (k-1)/10.0 where 1 ≤ k ≤100. Make sure that each record in your data file contains the fields for time and its corresponding Y(t).
2. (Reading from a file). The data file power1.dat contains a power plant output in megawatts over a period of 8 weeks. Each row of data contains 7 integers that represent 1 week’s data. Write a program that will compute and print to a file and to the screen the average power output over this period of time. Also print the number of days with greater-than-average power output.
13 years ago 15
Answer(1)
Purchase the answer to view it
NOT RATED
- read_power_dat.png
- damped_sine_wave.png
- hmwork7.zip
Bids(1)
other Questions(10)
- Fundamentals of Occupational Safety and Health
- english assignment. topic is "common man's crusade" content should not be googled
- topic is "common man's crusade" . content should not be googled. thanq
- Your friend has slipped and fallen. To help her up, you pull with a force F. The vertical component is...
- For IN_THE_MIDDLE_OF_THE_NIGHT Next Assignement
- I need it done
- mary
- 3x+(x+2)/5=3
- Economists agree that increasing aggregate demand is the most expedient way to get the country out of a recession.
- Ms.Bevels ordered a 12in diameter pizza, that is cut into 10 congruent pieces. She eats a piece of pizza, but...