Suppose you need to implement a routine to compute the


1. Suppose you need to implement a routine to compute the standard trigonometric function sin(x) on an embedded microprocessor that does not have a built-in sine function. For example you would need this when writing the firmware on a simple mobile phone.

You are to implement a Matlab function that computes sin(x) without obviously using the sin(x) or indeed any trig functions. Your routine should use only multiplies (and divides) and additions (and subtractions). Since this is a relatively easy (and common) task, the intention here is that you write a robust routine and that you extensively test it. Marks will be awarded for your testing and analysis of your proposed solution.

Hint: One way to do this is to use the standard Taylor series expansion sin(x) = X∞ k=0 (-1)k (2k + 1)! x 2k+1 You might find it useful to use a while loop and terminate the series when sufficiently accurate, say when the error is less than 10-12. Also note that factorial(n) computes the factorial in Matlab. Root finding

Request for Solution File

Ask an Expert for Answer!!
Science: Suppose you need to implement a routine to compute the
Reference No:- TGS01247254

Expected delivery within 24 Hours