Question
1_ The Taylors series expansion of cos(x) is cos(????) = 1 ? ????2 2! + ????4 4! ? ????6 6! + ? = ? (?1)????
1_ The Taylors series expansion of cos(x) is cos(????) = 1 ? ????2 2! + ????4 4! ? ????6 6! + ? = ? (?1)???? (2????)! ????2???? ? ????=0 where x is in radians. Write a user-defined function that determines cos(x) using Taylors series expansion. For function name and arguments use y=cosTaylor(x), where the input argument x is the angle in degrees and the output argument y is the value for cos(x). In the program use a loop for adding the terms of the Taylors series. If an is the nth term in the series, then the sum Sn of the n terms is Sn=Sn-1+an. In each pass, calculate the estimated error E given by the equation: ???? = ? ??????????????????1 ?????????1 ? Stop adding terms when E ? 0.000001.
Use cos Taylor for calculating
a) cos(60)
b) cos(110)
2_Use the Emissions data from project 1 to:
a) Import the torque data for each manufacturer
b) Use loops to replace all negative values with a zero
c) Once the negative numbers are replaced by zeros, calculate average torque values for Manufacturer A,B,C
d) Use an fprintf command to display the average torque values for Manufacturer A,B,C
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started