Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Do this in MATLAB Just do a, d, and f please afined 15 UL megers that are untomy buted between the numbers a and b.
Do this in MATLAB Just do a, d, and f please
afined 15 UL megers that are untomy buted between the numbers a and b. All the selected numbers on the list be different. For function name and arguments, use lotto (a, b, n) where the input argument are the numbers a and b, and n. Waspectively. The output argument x is a vector with the selected numbers. Use the function to generate a list of seven numbers from the numbers 1 through 59. ch) Use the function to generate a list of eight numbers from the numbers 50 through 65. (c) Use the function to generate a list of nine numbers from the numbers -25 through -2. 33. The Taylor's series expansion for cosx about x = 0 is given by: 0 cosx = 1 - 2 +... = 2(2x)!" where x is in radians. Write a user-defined function that determines cosx using Taylor's series expansion. For function name and arguments, use y=cosTay (x), where the input argument x is the angle in degrees and the output argument y is the value for cosx. Inside the user-defined function, use a loop for adding the terms of the Taylor's series. If a, is the nth term in the series, then the sum S. of the n terms is S = S-1+a. In each pass, calcu- S.-S-1. Stop adding terms when late the estimated error E given by E = I S-1 0.000001. Since cos(e) = cos(+ 360m) write the user-defined function such that if the angle is larger than 360, or smaller than -360,then the tay- of series will be calculated using the smallest number of terms (using a value for x that is closest to 0). Use cos Tay for calculating: (a) cos 67 (b) cos 200 10) cos 794 (e) cos 20000 C) cos-73 (c) cos-80. (6) cos 200 Compare the values cal e values calculated using costay with the values obtained by using MATLAB's built-in cosd functionStep 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