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

Design pumps for plant layout, Q. Design Pumps for plant layout? Pumps ...

Q. Design Pumps for plant layout? Pumps handling flammable or combustible materials are relatively frequent sources of leakage and should therefore be located as far as practic

Centrifugal air compressor, Centrifugal air compressor: A centrifugal...

Centrifugal air compressor: A centrifugal air compressor delivers 15Kg of air per minute. The outlet and inlet conditions are At inlet: Velocity = 5m/sec, enthalpy = 5KJ

Second gear position- shifting of gear, Second Gear Position: When ge...

Second Gear Position: When gear M2 on the main shaft is in mesh with gear C2 on the countershaft then this is known as second gear position. To rotate free gear M2 with the m

Shm, How we say that motion of the follower is simple harmonic motion descr...

How we say that motion of the follower is simple harmonic motion describe in practical approch

Advantages of resistance welding, Advantages of resistance welding   ...

Advantages of resistance welding   1. Resistance welding is very fast compared to arc welding. 2. Almost any combination of metals can be resistance welded provided necessa

Determine the radial and circumferential stresses, Determine the radial and...

Determine the radial and circumferential stresses: The internal & external diameters of a thick hollow cylinder are 80 mm & 120 mm respectively. This is subjected to an extern

Engine lubrication system , Engine Lubrication System: This system facilit...

Engine Lubrication System: This system facilitates the lubrication of all the engine components, gears and other associated parts.

Working of telescopic hydraulic fork , Working of Telescopic Hydraulic Fork...

Working of Telescopic Hydraulic Fork:   When a road shock exerts on to the suspension system it is transmitted to the spring instead of motorcycle frame and the spring starts to o

How are the cutting fluids classified, (a) How are the cutting fluids class...

(a) How are the cutting fluids classified ? Explain every class with a couple of lines. (b) A carbide cutting tool has tool life exponent n = 0.27. It gives a tool life of 60 mi

What is a cotter joint, These parts of joints are used to connect two rods,...

These parts of joints are used to connect two rods, which are under compressive or tensile stress. The ends of the rods are in the manner of a socket and shaft that fit together an

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