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

Refrigeration cycle, 1.5kw/ton of refrigeration is required to maintain tem...

1.5kw/ton of refrigeration is required to maintain temp of -40c in the refrigerator.if the cycle works on carnot cycle.determine 1.cop,2.sink temp 3. heat rejejected to the sink/to

Four-stroke - single cylinder gasoline engine, A four-stroke, single cylind...

A four-stroke, single cylinder gasoline engine having a bore of 90 mm and stroke of 100 mm has a compression ratio 7. The relative efficiency is 55% when the shown specific fuel co

Torsion, series shaft and parallel shaft

series shaft and parallel shaft

Deflection at the centre - maximum deflection, Deflection at the centre - m...

Deflection at the centre - maximum deflection: A simply supported beam of span 6 m is subjected to Udl of 24 kN/m for a length of 2 m from left support. Discover the deflectio

National supply and national demand curves, National supply and national de...

National supply and national demand curves: 1. Explain why neighboring countries tend to trade extensively with each other. 2. Use Table 1.1 to find the five most open econ

The continue dimension command-autocad, The Continue Dimension Command ...

The Continue Dimension Command You can use the Continue command to add a string of dimensions. In the illustration above the "36mm" dimension has been continued from the "64mm"

Scissors crossing, Scissors Crossing: A scissors crossing consists of...

Scissors Crossing: A scissors crossing consists of two crossovers overlapping each other. It is shown in Figure. Figure: Scissors Crossover Triangles

Lathe - milling and grinding machine, Define O.R. and what are the applicat...

Define O.R. and what are the applications in Industry ? A firm uses lathe, milling and Grinding machine to make two machine parts. The table below show the machining time requir

If no leak found in the above listed area remove flywheel, If no leak found...

If no leak found in the above listed area remove flywheel: Remove fly wheel and check weather oil leak is from the seal or "o" ring.

Concept of plane stress, Concept of plane stress: Define the concept ...

Concept of plane stress: Define the concept of plane stress. Sol.:   In cubical element of strained material is acted on by stresses acting on only 2 pairs of parallel plane

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