Question: 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)

 code In C please 3. Second-order simulation (50 points). a. Write

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!