Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

1. Five reactors linked by pipes are shown in the following figure. The rate of mass flow through each pipe is computed as the product of flow (Q) and concentration (c). At steady state, the mass flow into and out of each reactor must be equal. For ex, for the first reactor, a mass balance equation can be written as Q01c01 + Q31c3 = Q15c1 + Q12c1.

1029_Reactors.jpg

a) prepare mass balance equations for the remaining 4 reactors. Put the known values in the 5 equations and convert each equation into a form where left hand side contains all the variables and the right hand side the constant term.

b) Express the equations in the matrix form Ax = b. Show each of the three matrices i.e the coefficient matrix, the variable matrix and the constant matrix.

c) Perform LU factorisation of A using MATLAB. Show commands that you run and the lower triangular matrix L, the upper triangular matrix U and the permutation matrix P.

d) Then use L,U,P matrices in MATLAB to find the values of the variables in your equations. Show your commands and their output.

e) If c03 = 60 and c01 = 30, perform the minimum tasks on MATLAB to find the values of the variables. Show your commands and their output.

2. In numerical integration and in many other cases, we need a polynomial named Legendre polynomial. Often the zeros i.e. the roots of the polynomial are also needed. The sixth order Legendre polynomial is given by the following equation:

P6(x) = 693x6 – 945x4 + 315x2 – 15

There are six roots of the P6(x) = 0 equation. Note that all the zeros of Legendre polynomial have magnitude less than one i.e. the roots are between -1 and 1. Also, note that for a polynomial of even order, the zeros are symmetrical about the origin. Therefore, for each root x, -x is also a root. If you find the three roots between 0 and 1, the other roots are negative of them.

Now prepare a MATLAB program that does the following:

a) Plot the given function in MATLAB for x ranging from -1 to 1. Put a proper title of the plot, also label the axes appropriately.

b) Use MATLAB's roots function to obtain the six roots of the equation. Display the roots and plot them with different colors and symbols on the same chart where you plotted the function.

c) prepare a MATLAB program segment that will implement the root finding algorithm by Newton-Raphson method. Newton-Raphson method needs one initial value to run each time. You program segment will be executed with different initial values that you get from d).

d) Use a loop in your program to execute the Newton-Raphson program segment for each initial value between -1 to 1 with an interval 0.1. Plot the initial values on the x-axis with the color that you used in b) to plot the root obtained from this initial value; these plots will be on the same chart. For ex, if you start from 0.1 and obtain the first root that you plotted by using color red in b), then plot (0.1, 0) with color red.

e) In the plot, you will see one root is obtained from an initial value that is close to another root. Can you describe by observing the plot why that is happening.

3. Consider the following three sets of equations.

8x + 3y + z = 12
-6x + 7z = 1
2x + 4y -z = 5

x + y + 5z = 7
x + 4y -z = 4
3x + y – z = 3

-x + 3y + 5z = 7
-2x + 4y -5z = -3
2y -z = 1

a) prepare all of the above sets of equations in the matrix format and identify the sets that you cannot solve by using an iterative method such as Jacobi and/or Gauss-Seidel method. Show the details of how you decide that the method will not converge for the identified set.

b) If there is any set in the above three that will converge, select that (or any one if more than one exists) and manually show as many steps as you need for the Jacobi Method to achieve an absolute approximate relative error level for each variable below 5%.

c) Using the same set of equations that you used in b), manually show as many steps as you need for the Gauss-Seidel method to obtain the absolute approximate relative error level for each variable below 5%. While following Gauss-Seidel method steps, describe where you are doing different from that you did in case of the Jacobi method.

d) Consider the number of steps required in Jacobi Method and in Gauss-Seidel method to achieve the same quality (in terms of absolute approximate relative error to be below 5%) solutions. Which method is more efficient in the number of steps? Can you describe why that method is more efficient than the other?

4. The figure below is an ex profile of a man. Instead of the profile, you can also use a unique (different to every one else's) profile (e.g. car, boat) of your own from any other source.

958_Profile of a man.jpg

a) Include the original photograph of your selected profile with your assignment. Trace your drawing on a graph paper. For convenience you can rotate the given profile.

b) Locate 20 points on the profile. You should select more points where the profile is more curvy, and few points where the profile is almost linear. Display these points in MATLAB output and on MATLAB chart with color blue but no lines to join them.

c) You will use MATLAB polyfit and polyval functions to find one polynomial with all points. Now plot the profile with your fitted polynomial; you should plot more points on the polynomial in this case. Use a different color.

d) Try different numbers of points from your tracing for polyfit and different numbers of points for polyval to plot them. Show at least five different attempts. You will plot these 5 attempts using 5 different colors. Make these attempts in such as way that the best plot looks as much alike as possible to the original profile given.

5. A circular shaft has a diameter, d (m), that varies with axial position, x (m), along the shaft (from the support position at x = 0 m). The variation is given by d = 0.02e-x(1+x2) where 0 ≤ x ≤ 3 m. An axial load P = 40kN is applied to the end of the shaft, whose Modulus Elasticity E = 2*1011Nm-2. The axial elongation of the ΔL (m) of the shaft in the range of values of 0 ≤ x ≤ 3 m is given by: ΔL = P/E ∫4dx/(πd2).

2109_circular shaft.jpg

a) Using MATALB, plot the shaft diameter with axial position. Use appropriate labels.

b) Use MATLAB integration techniques to determine the total Axial Elongation.

c) describe the theory of Simpson 1/3 rule for integration in detail. Use appropriate exs to demonstrate how it works and how the integration result is computed.

The effective average DC equivalent value of an alternating current is given by the formula:

IRMS = √(T-1∫[i(t)]2dt)

where i(t) is the instantaneous current (A) and T is the waveform period (s) and the lower and the upper limits of the integration are 0 and T. The current within a circuit (which replicates every 5 ms) is given by:

i(t) = 10e-t/5sin(2πt/5) (mA)

a) Using MATALB, plot the circuit current i(t) over four periods. Use appropriate labels.

b) Use MATLAB integration techniques to determine the equivalent DC current (RMS) within the circuit.

c) Describe the theory of Simpson 1/3 rule for integration in detail. Use suitable exs to demonstrate how it works and how the integration result is computed.

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M92993

Have any Question?


Related Questions in MATLAB

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignmentafter the success of your robo-advice venture you

Assignment After the success of your robo-advice venture you decide to explore alternative sources of profitability for your company. You realize that Australian investors are often forced to chose between expensive acti ...

Prepare a 3 - 10 pages long reportprepare a presentation

Prepare a 3 - 10 pages long report Prepare a presentation with 5 - 9 slides. The slides will include introduction (need and similar work), theoretical background (tested neural networks), Data, Results (Comparison of the ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Suppose that a student has the option of enrolling for a

Suppose that a student has the option of enrolling for a single elective during a term. The student must select a course from a limited list of options: "English, " "History, " "Biology, " "Computer, " or "Math." Constru ...

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As