Matlab Question, Mechanical Engineering

Assignment Help:
help write the matlab code desired:
The sine function can be evaluated by the following infinite series as (where the angle x is given in
radians):
xsinx = x-(x^3)/3! + (x^5)/5! - (x^7)/7!....
(a) Create a function M-file mysin1 that takes the angle x (in degrees) and the number of terms n as
the input, and returns sin(x) as the output using n number of terms in the above expansion. Test
your function with x=1.53, and n=10.
(b)Create a second function M-file mysin2 that takes the angle x (in radians) and the significant
digits sigdig as the input, and returns sin(x) correct to sigdig significant digits as the output.  Test
your function to find sine of 2.24 correct to 14 significant digits.

Related Discussions:- Matlab Question

Determine the response of the system, A force F(t) is suddenly applied to a...

A force F(t) is suddenly applied to a mass m which is supported by a spring with a constant stiffness ‘K'. After a short period of time T, the force is suddenly removed. In the mea

Battery components , Cell Connectors A cell connector connects the ne...

Cell Connectors A cell connector connects the nearby cell with two terminals of opposite polarity (sign). Post strap connect the plates to the terminal. Electrolyte

Elongation due to self weight, Elongation due to self weight of uniform tap...

Elongation due to self weight of uniform tapered cone bar

Section modulus and value of bending moment, Q. Wha t do you mean by secti...

Q. Wha t do you mean by section modulus ( Z )? What is value of bending moment in the terms of section modulus? Sol.: Section modulus is ratio of M.I. about neutral ax

Strain, is strain in bending important parameter to consider?

is strain in bending important parameter to consider?

Design an evaporator system, Q. Design an Evaporator System? The Evapor...

Q. Design an Evaporator System? The Evaporator System is designed to produce high quality distillate. The feed water to the evaporator system is dosed with antiscalant and rece

Calculate the angular acceleration of the wheel, Calculate the angular acce...

Calculate the angular acceleration of the wheel: A locomotive wheel of radius r = 0.8 m is illustrated in Figure. At the given instant, the speed of the locomotive is 1.6 m/se

Find out the moment of inertia of a semicircle, Find out the moment of ine...

Find out the moment of inertia  of a semicircle: Find out the M. I. of a semicircle ABM around its periphery AB and also around centroidal axes x and y as illustrated in Figur

How to calculate coupling factor?, Q. Two coils with self inductances 1H an...

Q. Two coils with self inductances 1H and 4H have a mutual inductance of 1H. The RMS value of current flowing in the two coils is 4A and 1A respectively. Find  the coupling factor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd