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

Spot welding of different metals, Spot welding of different metals Thou...

Spot welding of different metals Though, mild steel is t he metal most commonly used, any prime metal or alloy can be successfully spot welded provided that machine with suitab

Nominal stress and true stress, Nominal Stress and True Stress: Nomina...

Nominal Stress and True Stress: Nominal stress is the ratio of force per initial cross sectional area (original area of cross section). Nominal stress = Force / initial ar

Applications of cutting tool materials, Discuss the method of properties, m...

Discuss the method of properties, manufacturing and applications of following cutting tool materials: (i) Carbides (ii) Ceramics (iii) Cubic Boron Nitride (CBN) What ar

Classification of cast iron, Classification of Cast Iron: CI having C...

Classification of Cast Iron: CI having C in form of cementite is named as white cast iron. Microstructure of that CI consists of pearlite, cementite and ledeburite. Whether C

Illustrate vacancy defect and screw dislocation, Illustrate vacancy defect ...

Illustrate vacancy defect and screw dislocation with diagram. Also show the induced nature of stress and stress by mean of diagram. Illustrate interstitial defect and edge disl

Determine the width and depth of the beam, Determine the width and depth of...

Determine the width and depth of the beam: A timber beam of rectangular section is only supported over a span of 5 m. It carries an uniformly distributed load of 15 kN/m over

What is the mean of off time, Q.What is the mean of Off time? It is the...

Q.What is the mean of Off time? It is the interval from the end of the hold time to the beginning of the squeeze time for the next (resistance) welding cycle. In automatic m

Safety benefits - industrial safety, Safety Benefits - Industrial Safety ...

Safety Benefits - Industrial Safety An industry or a company which follows safety programmes is benefitted in several ways. The benefits are shared among employer and employee

Machien element, assumptions made in deriving a bending formula

assumptions made in deriving a bending formula

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