Write a matlab code using the switch statement

Assignment Help MATLAB Programming
Reference no: EM132070084

Questions

1. Evaluate the following mathematical expression using MATLAB commands. Display your results by omitting semicolons at the end of your command lines.

1/4√52+ 62/3;

R = (8x3√x + 51/3x2)/x√x+41/3x2/3

where x = 3√(200 - 4√2 + 3(√99 - 3√5))

2. Solve the following system of equations using the MATLAB functions or operators:

2x-y+3z-t -3

x-2y-2z-3t = 2

5x -3y- z +2t = 3

3x-Fy+z+4t=7

Verify your solution using matrix multiplication.

3 Input the matrices

1970_matrix.jpg

(a) Using MATLAB functions, verify that det(A) det(B) = det(AB) ;

(b) Calculate AB and 3ATB-1- 3B.

4 Write a MATLAB script to produce the graphs of the functions y1 = 2x-2 , y2 = x2 - 2 + 2 and y3 = -x3 in the range of -3:0.013 using the same axes. Use the MATLAB functions xlabel, ylabel.legend and title to annotate your graph clearly.

5. Use the surf function to plot z = x2/(1+y2), for, =-5:01 :5 and y =-5:0.1:5.

6. Write a MATLAB script to plot the piece-wise function of given by:

f(x) = 3x2 - Π2/4
f(x) = 4cosx + Π2  -Π/2 ≤ x ≤ Π/2
f(x) = x2 + Π2/4    x < -Π/2

x varies between -Π and Π with 100 data points.

7. For x = 1:10 calculate y = e0.2x, use fopen and fprintf to write x and y data into a file named "my ex_data . dat". Then use fopen and fscanf to read the x and y data. Show the data in 2 columns.

8. Write a MATLAB code using the switch statement to show whether a day of the week is a week day or weekend day. The day of the week is read in from the user as a string. Monday, through Friday are assumed to be week days and Saturday and Sunday are assumed to be weekend days.

9. We know that 1 - 1/3 + 1/5 -1/7 + = 1/4Π. How many terms do we need to have in order for the error to be smaller than 10-4? Write a MATLAB code to find out.

10. Write a MATLAB program that will display the numbers from 1 to 1000 which are cubic numbers (such as 8 = 2*2*2). The program should display: 1, 8, 27, .... Run your program and verify that it operates correctly.

Reference no: EM132070084

Questions Cloud

How much will jenny have to invest each month : Jenny is planning to retire at 65 and her goal is to have $750,000 in her 403b when she retires. How much will Jenny have to invest each month if she earns 9%?
Making a capitol investment decision : What parts of financial statements are looked at when making a capitol investment decision?
What is the required dollar amount and long or short : What is the required dollar amount and long or short in this option and in futures?
Percentage of total assets at the typical bank : Why are loans such a high percentage of total assets at the typical bank? What four broad classes of loans do banks engage in?
Write a matlab code using the switch statement : Solve the system of equations using the MATLAB functions or operators - Write a MATLAB script to plot the piece-wise function
Calculate the net income for proposed project : Calculate the net income for this proposed project. (Round to two decimal places)
What is the expected return of stock : The firm pays out 50% of its earnings as dividends. What is the expected return of this stock?
Cash flow analysis of a new product : Out of the following items which should NOT be included in the cash flow analysis of a new product?
What level of sales : Oliver Industries reported net income of $75 million in 2017. The company's corporate tax rate was 40% and its interest expense was $25 million.

Reviews

len2070084

7/30/2018 5:31:16 AM

Please organise the Assignment as follows: Scan these into a "single".pdf file. You can reduce the file size by up to 50% as a jpeg option when saving the file. Use a low scan resolution of 75 or 150 dpi for individual pages to keep the combined file below a few MB so you do not run into file size errors in the mail program (files above 8 MB will be rejected and the student asked to resubmit the file within the size limit). Submit the single file through Moodie in the Assignment Submission page. total of 10 questions. Each carries 2 marks

len2070084

7/30/2018 5:30:59 AM

All answers require a clear justification in order to receive marks. For each question, provide complete step-by-step workings that clearly show the means by which the solutions were obtained. Trial and error will not be accepted as a justification. However, it is a good idea to check your answers where you are able. Because this assignment requires MATLAB programming, you need to type your source codes and detailed workings and include final results (including plots if required) in each question. Therefore no hand-written materials will be accepted.

Write a Review

MATLAB Programming Questions & Answers

  Matlab: create a function that will use the secant method

MATLAB: Create a function that will use the Secant method

  Review about using audio weighting in matlab

Write a Literature review about using Audio weighting in Matlab by applying A-filter to the data. Add (graphs and imagines or charts) must also write one or two sentences to describe it

  Load the handel sound file in matlab

Load the handel sound file in MATLAB and add the preceding three sinusoidal signals to create a corrupted sound signal-Design an IIR filter using notch filter

  Use the definition for the laplacian in the discrete case

Show that subtracting the Laplacian from an image is proportional to unsharp masking. Use the definition for the Laplacian in the discrete case to derive the equivalence relation, constant weighting factors should not affect your conclusion.

  Design a bandpass filter using the hamming window design

a finite impulse response (FIR) filter is a filter whose impulse response is of finite length duration, because it settles to zero in finite time

  Blood declines due to metabolic processes

Find an expression for the half-life in terms of k, and obtain a plot of the half-life versus k for the indicated range.

  The power input p to a centrifugal pump is assumed to be a

the power input p to a centrifugal pump is assumed to be a function of the volume flow rate q impeller diameter d

  Find and plot the joint trajectories

ROBOTICS-INDUSTRIAL ROBOTS, ANALYSIS AND APPLICATIONS-Find and plot the joint trajectories which would move origin of the hand on a straight line

  Computes the stiffness matrix for one bilinear element with

write Matlab code that computes the stiffness matrix for one bilinear element with 4 nodes

  Progrmaing i uploaded the

i uploaded the instruction. ltbrgt

  Create a function that will determine the total resistance

Create a function that will determine the total resistance of a number of resistors that are connected in parallel. This function should accept a row vector for input,

  Solve the given problem by matlab

Consider the system of Fig. and plot the response to the initial conditions (0) = 2cm, 1(0) = 0 for the values of the damping factor ? = 0.1,1.

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