[SOLVED] EE384 Lab 0

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon lab0-9hmxof.zip (302 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
Rate this product

1.1) What is the result of:

  1. a+b
  2. a*b
  3. *b where β€˜a’ and β€˜b’ are column vectors

1.2) Repeat 1.1 but with β€˜a’ as a matrix

Turn in your answer.

Problem 2:

Plot following functions in the same plot (overlay)

𝑦1 = cos(𝑑) 𝑦2 = sin(𝑑)

where β€˜t’ is a vector from 0 to 50 with the increasing step:

  1. 1
  2. 01

Do the signals look smoother when we reduce the increasing step? Turn in your answer, plots, and codes.

Problem 3:

Write a program to solve the system of equations of three variables using the matrix inverse method. The program should include user prompt to input equation coefficients. The general form of a three-variable equation isΒ  π‘Žπ‘₯ + 𝑏𝑦 + 𝑐𝑧 = 𝑑. Assume that the users have to give the coefficients in the order β€˜a’, β€˜b’, β€˜c’, and β€˜d’. Test your program with the following system of equations:

2π‘₯ + 3𝑦 + 𝑧 = 3

π‘₯ + 3𝑦 βˆ’ 𝑧 = 6

2π‘₯ + 2𝑦 = 7

Turn in your code and result from the Matlab command window.

Hints: Note that from Linear Algebra theory, you can solve the system of equations using matrix inverse method by the following steps:

Step 1: Rearrange the equations so that all of them have the form of π‘Žπ‘₯ + 𝑏𝑦 + 𝑐𝑧 = 𝑑

Step 2: Write the equations in matrix form 𝐴 βˆ— 𝑑 = 𝑏

Step 3: The result is 𝑑 = π΄βˆ’1 βˆ— 𝑏

π΄βˆ’1 is the inverse matrix of A and could be computed in Matlab by using the command inv(A).

Problem 4:

Write an M-file program to calculate:

Β 

where β€˜log’ is the natural logarithm function, β€˜sign’ is the signum function.

The program must include a user prompt to input the parameter β€˜Β΅β€™ and input β€˜x’. Note that β€˜x’ can be either a scalar number or a vector. The above equation shows the input-output characteristic of a Β΅-law compressor used in pulse-code modulation (PCM).

Test your program by plotting β€˜y’ according to β€˜x’. Let Β΅=255 and β€˜x’ is a vector changing from 0 to 1 with the increasing step 0.01. Turn in your code and plot. Keep a copy of your code, you will need it later.

 

  • lab0-9hmxof.zip