Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

1. You are testing a theory which says that the output displacement of a measurement device should vary with time according to the equation:

D(x) = {x2 cos (x)} / (x +1)

So far, you have measured the following set of experimental data for D and t:

t (min)

0

1

1.5

2

2.5

3

4

5

6

8

10

M (mm)

0.01

.3

.1

-.8

-1.5

-2.2

-2

1.9

5.1

-1.3

-8

1) Plot the function ( ) in the range of . Use increment of 0.1.
2) On the same plot, aslo plot the above Data (M versus t).
3) Add a title, label the axes, and use proper legends appropriately. Submit the graph and the m file (both copied in your word file) you have produced to produce the plot.

2. Write a MATLAB function that can be used to solve a quadratic equation if answers are real numbers (you have to do following steps):

2ax2 - 3bx + 4c = 0

. The inputs to the function are the three coefficients a, b, and c.

. Check if the equation has real solutions. If there is no real solution the program should display ‘THERE ARE NO REAL SOLUTIONS' then quit the program.

. Otherwise, calculate the solutions and display them as shown in the following example (use the fprintf command showing each solution with

4 decimal points). As example:

‘The solutions are -3.4135 and 9.7435'

.Try to solve two quadratic equations with coefficients: [a, b, c] = [1 , 1, -4] and [a,b, c] = [5 -1 3]

Submit the m file for your function, and the results of both test runs done in MATLAB (again copy and paste them in the word file)

3. a) Write a function m-file that will calculate the function f(x)

f(x) = e-x

b) Calculate f(1) in MATLAB and print it in with 15 decimals.

c) The taylor series for the function f(x) is given as

f(x) = ex = 1 - x + x2 / 2 -x3 / 6 + x4 / 24 + ... + (-1)n xn / n! + ...

If we only take 6 terms (including constant term) of this series to compute f(1), what is the true percentage error? Use answer in part (b) as true answer.

4. Answer the following questions (keep your answers short and precise)

a) Explain the differences of operators ‘ * ' and ‘ .* ' in MATLAB.

b) The following MATLAB script is written in MATLAB by another user but when you try to use it function value generate error message. Please correct these statements so it will generate y(x) on the domain, x from 0 to 2π.

Y(x) = {ex cos2 (x)} / (x3 + 3x)

The MATLAB script

x = linspace(0,2pi);

y(x)= ex*cos2(x)/x3+3x

5. Develop a MATLAB function that will compute the following function. Test your function for t = 7, 15, 25 and 100. Include your m file and the output of your tests in the word file.

1329_Function.jpg

Plot the function in the range of -4 ≤ t ≤ 6

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M91975557
  • Price:- $60

Priced at Now at $60, Verified Solution

Have any Question?


Related Questions in MATLAB

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

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 ...

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 ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Assignmentq1 find the laplace transforms of the following

Assignment Q.1 Find the Laplace transforms of the following functions: (a) t 2 + at + b and (b) sin(2nΠt/T) Q.2 Find f (t) for the following F(s) = α[ f (t)]. (i) 5/(s + 3), (ii) 1/s 2 + 25, (iii) 1/s(s+1) Q.3 Find the L ...

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 ...

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 ...

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 ...

Lab assignment - matlab matrix relationallogical operators

Lab Assignment - MATLAB Matrix, Relational/Logical Operators and Plotting This laboratory exercise/assignment will involve you 1) practicing multiplication operators in MATLAB; 2) practicing relational and logical operat ...

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 ...

  • 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