Find the initial interval for the root search

Assignment Help Computer Engineering
Reference no: EM1327407

1. Construct your own MATLAB function realizing the insertion sort algorithm.
Your function should have an unsorted array as its input and the sorted array as the output. In particular, you will need:
(i) Draw a flowchart of the function realizing the insertion sort
(ii) Write the corresponding MATLAB code. You should check (just for yourself) how your function works with an arbitrary unsorted array.

2. Write your own function computing cos(x) based on the Taylor expansion of cos(x) in the vicinity of zero. Name this function my_cos(x, N, eps). The input parameters in this function should be: x- the argument; N - the initial number of terms in the expansion; eps -optional parameter, giving the accuracy of approximation. In particular, you will need to do:
(i) Write MATLAB code for a function computing cos(x) based on the Taylor expansion with the fixed number of terms N in the expansion. Name
this function my_cos1(x,N). Draw a flowchart of my_cos1
(ii) (8 marks) Write a MATLAB code for my_cos(x,N,eps) based on the function my_cos1(x,N). 'Eps' is an optional parameter, the giving the accuracy. In other words, your function can used in two modes: my_cos(x,N,eps) and my_cos(x,N). Draw a flowchart of my_cos.

Hint: if we need to compute cos(x) with a given accuracy ?, we can truncate the infinite part of Taylor expansion cos(x)=a0+a1 x+a2 x2+... + an xn+...starting with the term an xn in case we have |an xn|<?.

3. You are computing now the roots of a nonlinear equation f(x)=0 with the accuracy ? based on the bisection method (use Wikipedia for details about the method, section 'The method'). The given accuracy is achieved in case |f(c)|< ? , where c- is an approximate root of the equation.
You will need to construct your own MATLAB function bisect_1(fname, a, b, eps), where fname - is the name of the function; a,b, determine the initial interval for the root search; eps is the accuracy.
(i) Draw a flowchart of bisect_1(fname, a, b, eps).
(ii) Write MATLAB code for bisect_1(fname, a, b, eps).
(iii) Find all roots of the equation exp(- cos(x)) -1=0 in the interval 0<x<3

Reference no: EM1327407

Questions Cloud

Scope, magnitude and feasibility of finding solution : Discuss the significance, scope, magnitude and feasibility of finding a solution to why students respond negatively to online learning teams and what can be done to promote a more positive experience.
Explain future environmental factors- mail packaging : Explain Future environmental factors- mail packaging or supply business and which factors do you think will have the most important impact
Wage and hour law of california : What are Exempt employees versus nonexempt employees as it relates to California?
Explaining power and leadership in organization : What is the relationship between power and leadership in an organization? How is power gained?
Find the initial interval for the root search : Write down the corresponding MATLAB code. You should check (just for yourself) how your function works with an arbitrary unsorted array.
Briefly elucidate how knowledge of price elasticity : Briefly elucidate how knowledge of price elasticity between different groups of customers
Prepare the standard cost of direct material : Development of standard costs - Prepare the standard cost of direct material, direct labor and packaging for a 10 gal batch of nerries sherbert.
Computing present value and future value : Find out the future value one year from now of $7,000 investment at a 3 percent annual compound interest rate. Also calculate the future value if the investment is made for two years.
Coimpute how much the shortage or surplus is if there is any : Coimpute how much the shortage or surplus is if there is any.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Program declaring an integer variable

Write down a complete program that declares an integer variable, reads a value from keyboard into that variable.

  Discuss pros of using automated testing tools

Why do so many in-house applications never get finished.

  Program to calculate the weight of students

We have run regression analysis along with the resulting estimated regression equation as follows:” the estimated weight equals (-180 pounds) plus (5 pounds times the height in inches).” Write down the program to calculate the weight of students.

  Prepare a use case diagram

Prepare a Use Case Diagram based on the given problem description.

  How much of a disadvantage computer scientists have

Philosophy is deeply rooted in the History of Computers starting with Leibniz and his concept of binary. Leibniz's dream imagines Armchair Philosopher to be left alone with his thoughts while machines take care of all the other menial tasks requir..

  Write down an equation and draw a circuit

offer below is a truth table for a combinational logic circuit with three inputs and one output. Write an equation and draw a circuit which implements the function represented by this table.

  Designing the decision table

Design a decision table to represent the kind of treatment to be given to the customer of Eye Tunes Music Club. Produce a structured English version on the basis of following dialogue obtained by Systems Analyst from client interview.

  What resources do need to conduct

What restraints are in your workplace that prevents the new computer system installation.

  Demorgans theorem

Compute by means of the truth table the validity of DeMorgan’s theorem for three variables: (ABC)’ = A’ + B’ + C’. Simplify the following expressions using Boolean algebra. AB + A(CD + CD’)

  Management systems do for sales and marketing

What can the knowledge management systems do for Sales and Marketing? What can they NOT do?

  Explain the characteristics of a high performance team

Listing and define six major SDLC phases and the products of each. Indicate the CASE tools that would be used to support each phase.

  Illustrate the system processed from the viewpoint

Illustrate the system processed from the viewpoint

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