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 lifting load of crane, Navy divers are called to rescue a group o...

Navy divers are called to rescue a group of office workers trapped in a basement under floodwater in Leeds, UK. The only access to the basement is via a 1.5 x 1.5 m horizontal hatc

Submerged arc welding, SUBMERGED ARC WELDING The optimum performance of w...

SUBMERGED ARC WELDING The optimum performance of welded vessels and structures in service have led to the full exploitation of automatic welding processes. This arc welding is on

Open and closed thermodynamic system, Steam flowing at a rate of 3200 lbm/h...

Steam flowing at a rate of 3200 lbm/hr enters an adiabatic nozzle. The initial condition of steam is: P1 = 250 psi, v1=620 ft/min, v1 = 2.4 ft3/lbm and u1 = 1125.5 Btu/lbm. The ste

Calculate the maximum stresses in the end plate, The end plate of a tube is...

The end plate of a tube is made from 4mm thick steel plate as seen in the figure below. If a 30mm diameter rod welded to the plate is subjected to a force of 10kN, what would be th

Show hazards associated with plants, Q. Show Hazards associated with plants...

Q. Show Hazards associated with plants? Hazards associated with plants will typically include the following: • Inherent fire hazards presented by the release of flammable g

Quenching and tempering, Quenching and Tempering Cast iron pearlite st...

Quenching and Tempering Cast iron pearlite structure might be heated to lower critical temperature and after that quenched to effect extremely rapid cooling. This treatment re

Shear stress, At apoint in apiece of elastic materialdirect stress of90mega...

At apoint in apiece of elastic materialdirect stress of90meganewton permeter square tensile and 50 mega newton per meter sqare compressive applied on mutually perpedicular planes.d

Explain the conventional frame, Show schematic diagram showing the layout o...

Show schematic diagram showing the layout of transmission system of four-wheel driven car. Explain briefly the following types of frame: (a) Conventional frame (b) Integra

Evaluate the motion of the system, Evaluate the motion of the system: ...

Evaluate the motion of the system: If in above Example, the block A is resting on an inclined plane at 45 o to horizontal as illustrative in Figure, find out the motion of th

MOS, limitations of euler''s theory

limitations of euler''s theory

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