Basic Matlab Problems - 76052

Request Posted by
sjameson3

sjameson3

Rating : No Rating
Earned: $0
Request Detail
Price: $15
Description

Problem 3-1

A) Find the roots of 2+x-exp(x)=0

B) Find the roots of x=sin((x/10)

Solve the above problem by:

 a) fixed point iteration

              b) Newton method

                      c) by Matlab function fsolve

For each case, plot the function and show the roots by a heavy 'o' on the graph

 Problem 3-2 :  Working with polynomials (see Poly_Help.m for solutions)

This problem gives you an opportunity to learn Matlab use the 'help' commands.

 (a) Evaluate the polynomial p(x) = 3x^2+2x+1 at x = -1,3 and 8 use polyval

 (b)   Plot the polynomial y = 3x^2+2x+1 for  x = 0 to 9.

 (use polyval to evaluate the function)

 (c) Find the derivative of y = 3x^2+2x+1 by polyder

 (d) Find the indefinite integral of f(x)=2+x^4 by  polyint

 (e) Find F(x)=f1(x)*f2(x) by conv, where f1(x)=x^2-1;f2(x)=x+1

 (f) Find the roots of F(x)=2*x^5-x^2+9=0 by roots

Problem 3-3: Solution of a system of 2 equationsconsider the following system od 2 equations:

   x1^2-x2+r=0    (1)

   -x1+ x2^2+r=0   (2)

Find ALL the roots of these 2 equations for the the following 4 cases:

(a) r=0.4, (b)   r=0.25  (c) -0.5  and (d) r=1.0

Solve the problem by Matlab use the following 3 methods:

 (i) by symbolic function solve, but report numerical values

 (ii) by matlab function fsolve

(iii) Use Eq(2) to express x1 in terms of x2 (x1(x2)). Next substitute x1(x2) into equation (1) to get an equation on x2 P(x2)=0 . Use roots to solve for the roots of P(x2) and then use x1(x2)) to find x1.

Plot the contours of the equations and plot the real roots, if any, on the contour plot

 

ATTACHED IS A TON OF EXAMPLES IN MATLAB WHICH CORRESPOND WITH THESE PROBLEMS, AND BASICALLY SHOW YOU HOW TO DO THEM.

 

Attachments
CH_3_Examples.m
CH_3_Examples.m
Please Login or Register to Submit the Solution for the Request