Create a flow chart-pseudo code or outline of algorithms

Assignment Help Civil Engineering
Reference no: EM13319018

One method of finding roots of an equation on a computer is the false position method. The idea is that for a function f(x), you find two values, f(x1) and f(x2) such that f(x1)* f(x2) is less than zero (think about what that means). We would then approximate a line between the points (x1 , f(x1)) and (x2, f(x2)), and then calculate where that line crosses the x axis at x3. We then look at f(x3) and determine if the root is between x1 and x3 or x2 and x3, and repeat the process. The algorithm finds x1 and x2 through trial and error or a coarse search. You are allowed to put in guesses for x1 and x2, but you are not allowed to call any other MATLAB commands to generate these guesses. Your assignment is to do the following:

1. Create a flow chart, pseudo code, or other outline of the algorithm you need to implement. This will need to be turned in with your MATLAB code.

2.Create a MATLAB script that implements this algorithm. You are not allowed to use any MATLAB functions that implement this algorithm. The mathematical function that you intend to find the roots of should be assumed to be in a function of the form function y = mathroots(x) So, for example, if you wish to find the roots of a simple quadratic equation, you would create the function function y = mathroots(x) y = 3*x^2 + 2 * x + 1; and store it in the file mathroots.m.

3. Test your script with one or two functions, and include the results of those tests in your code as comments

Reference no: EM13319018

Questions Cloud

How to draw and label a flowchart for the system : The temperature of steam at the inlets of both turbines is 500 C, and the enthalpy of steam is 3027 kJ/kg at the exit of high pressure turbine, and 2385 kJ/kg at the exti of the low pressure turbine.
How many molecules of carbon are in it : Carbon 12 is defined such that 12g is one mole. So if a diamond is 37.5 g, how many moles of carbon are in it? How many molecules of carbon are in it
How could you support michelle to deal with any issues : How would you support Michelle to satisfactorily perform the role and how could you support Michelle to deal with any issues and concerns that she might have?
Societies have rules and regulations in place to maintain co : All societies have rules and regulations in place to maintain control and order over their population. Violations of those rules and regulations result in the application of sanctions. Think of a recent time when you used informal negative sanc..
Create a flow chart-pseudo code or outline of algorithms : One method of finding roots of an equation on a computer is the false position method. The idea is that for a function f(x), you find two values, f(x1) and f(x2) such that f(x1)* f(x2) is less than zero (think about what that means).
Find the displacement of the plate : A square steel plate is 0:20 m on a side and 4:00 mm thick. Find the displacement of the plate
Determine critical crack length to assure plate wont fail : A 1047 steel plate is subjected to a tensile stress of 120 MPa. Given its fracture toughness is 45 MPa?m and Y = 1, (a) Determine the critical crack length to assure the plate will not fail under static loading.
How would you support michelle : How would you support Michelle to satisfactorily perform the role and how could you support Michelle to deal with any issues and concerns that she might have?
A very prestigious events planning firm : A very prestigious events planning firm

Reviews

Write a Review

Civil Engineering Questions & Answers

  Determine the resultant moment produced by the load

The tower crane is used to hoist the 2-Mg load upward at constant velocity. The 1.5-Mg jib BD , 0.5-Mg jib BC , and 6-Mg counterweight C have centers of mass at G1 , G2 , and G3 , respectively.

  Find steady state concentration of pollatant in the lake

fator dumps 5m^3/s of nonconservative waste with concentration 100mg/l into the lake. the pollutant has a reation rate coefficient K of 0,23/day assuming the pollutant is well mixed in the lake, find steady state concentration of pollatant in the ..

  Calculate the overflow rate and effulent weir loading

A wastewater treatment plant has two rectangular primary settling tanks, each 40 ft long, 12 ft wide, and 7 ft deep. The effulent weir length in each tank is 45 ft. The average daily wastewater flow is 387,000 gal.

  Determine the cost c of the turbine for mass flow

Ethylene enters a turbine at 10 bar and 450 K, and exhausts at (atm) and 325 K. For mass flow in = 4.5 kg s^-1, determine the cost C of the turbine. State any assumptions you make. Data: H1 = 761.1 , H2 = 536.9 kg^-1, C/$ = (15,200)(1W1/kW)^0.573

  What torque is the engine producing at the vehicle speed

A 3400-lb car is traveling in third gear (ratio 2.5 to 1) on a level road at its top speed of 130 mi/h. The air density is 0.00206 slugs/cuft. The car has frontal area of 19.8 sqft, a drag coefficient of 0.28, a wheel radius of 12.6 inches, a driv..

  What is smallest diameter pipeline that may be used to carry

What is the smallest diameter pipeline that may be used to carry 6.3 L/s (100 gpm) of water if the flow is to be laminar

  Find the weight per lineal foot for a normal weight of beam

the unit weight of normal weight reinforced concrete is commonly assumed to be 150 lb/ft cubed. find the weight per lineal foot (lb/ft) for a normal weight reinforced concrete beam that: a. has a rectangular cross section 16 in.

  How much must he set aside in his savings to account

How much must he set aside in his savings to account for the 3-months summer to cover his rent for next year. The savings account earns 3% with monthly compounding.

  Determine unfactored dead load and live load on roof beam

Determine the unfactored dead load and live load on a typical interior roof beam, sketch the loading on the beam, and draw the shear and moment diagrams for the beam assuming the beam is simply-supported.

  Parabolic trajectory of the falling prey

A hawk flying at 2 m/s at an altitude of 45 m accidentally drops its prey. The parabolic trajectory of the falling prey is described by the equation below until it hits the ground, where y is its height above the ground and x is its horizontal dis..

  Calculate the hydraulic conductivity of the clay

A falling-head permeability test was carried out on a clay soil of diameter 10 cm and length 15 cm. In 1 hour the head in the standpipe of diameter 5 mm dropped from 68 cm to 50.2 cm. Calculate the hydraulic conductivity of this clay.

  Determine the horizontal reaction

Determine the horizontal reaction that is developed on the gate at C.

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