Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1 [ 2 0 marks ] . Suppose you need to implement a routine to compute the stan - dard trigonometric function cos (
Problem marks Suppose you need to implement a routine to compute the stan
dard trigonometric function cosx on an embedded microprocessor that does not have a
builtin trigonometric function. You are require to develop a MATLAB function that com
putes cosx without using the builtin cosx function. Your routine should use only basic
arithmetic operations, including multiplies, divides, additions and subtractions.
a marks Develop a function for cosx in MATLAB and optimize your code. Addi
tionally, ensure to include comments as necessary for clarity and understanding.
b marks Examine three distinct accuracy levels to evaluate their influence on the ac
curacy of your computations. Plot absolute errors against x values, within the interval
pi pi Provide insights derived from the obtained results.
c marks Analyze the relationship between average absolute error and the order of
accuracy. Provide insights derived from the obtained results.
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