Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

code In C please 3. Second-order simulation (50 points). a. Write a function that takes parameters V, a, w, and t (all of type double)

image text in transcribed

code In C please

3. Second-order simulation (50 points). a. Write a function that takes parameters V, a, w, and t (all of type double) and returns a double representing the following response: y =Ve-acos(wt) b. In another function: i. Open a CSV file for output (writing). ii. Use a loop to call the function in (a) above for the time period t=0 to 10 seconds in steps of 0.01 seconds with parameters V=3.7, a = 0.3, and w=6.5. iii. Write t and the output from the function in (a) above in two columns (i.e. separated by commas) in the file. iv. After the loop is completed, close the file. C. Call the function in (b) above from main(). d. Don't forget to include . Use the standard library function exp(x) to calculate the value e' and the standard library function cos(x) to compute cos(x). 3. Second-order simulation (50 points). a. Write a function that takes parameters V, a, w, and t (all of type double) and returns a double representing the following response: y =Ve-acos(wt) b. In another function: i. Open a CSV file for output (writing). ii. Use a loop to call the function in (a) above for the time period t=0 to 10 seconds in steps of 0.01 seconds with parameters V=3.7, a = 0.3, and w=6.5. iii. Write t and the output from the function in (a) above in two columns (i.e. separated by commas) in the file. iv. After the loop is completed, close the file. C. Call the function in (b) above from main(). d. Don't forget to include . Use the standard library function exp(x) to calculate the value e' and the standard library function cos(x) to compute cos(x)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions

Question

What is the principle of thermodynamics? Explain with examples

Answered: 1 week ago

Question

Explain the strength of acid and alkali solutions with examples

Answered: 1 week ago