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

Metallurgy, Write a literature review on the manufacture and application of...

Write a literature review on the manufacture and application of metallurgical cokes in Nigeria.

Determine the eigen values, Determine the eigen values and eigen vectors of...

Determine the eigen values and eigen vectors of the matrix

Simple sresses and strains, Derive the formula for maximum instanteneous st...

Derive the formula for maximum instanteneous stress due to impact loading

Determine the convection coefficient associated with airflow, An experiment...

An experiment to determine the convection coefficient associated with airflow over the surface of a thick stainless steel casting involves insertion of thermocouples in the casting

Working of a four-stroke engine , Working of a Four-stroke Engine: To unde...

Working of a Four-stroke Engine: To understand the working of a four-stroke motorcycle engine, the whole operation can be divided into four parts, known as strokes. The strokes ar

The velocity distribution in the gap is linear, A 10 kg block slides down a...

A 10 kg block slides down a smooth inclined surface as shown in Figure. Show the terminal velocity of the block if the 0.1 mm gap among the block and the surface have SAE30 oil at

Theory of machine, In turning moment diagram. why we start to draw curve fr...

In turning moment diagram. why we start to draw curve from o degree?

Turbines, Illustrate governing Mechanism of Francis turbine.

Illustrate governing Mechanism of Francis turbine.

Determine the fluctuation in rail pressure under one wheel, An inside cylin...

An inside cylinder locomotive has its cylinder centre lines 0.70m apart and has a stroke of 0.60m. Rotating mass per cylinder = 150kg Distance between wheel Centre lines = 1.

Statements of second law of thermodynamics, (a) Show that two statements of...

(a) Show that two statements of Second Law of thermodynamics are equivalent to each other. (b) A house that was heated by electric resistance heater consumed 1200 KWh of electri

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