Instructions: 1. Solve the following problems in a MATLAB script. You will be allowed to submit only...

50.1K

Verified Solution

Question

Electrical Engineering

Instructions:

1. Solve the following problems in a MATLABscript. You will be allowed to submit only onescript, please work all the problems in the same script(Hint: careful with variables names)

2. Show your work and make comments in the same script (Use %).Please write your name in the first line of the scrip with %

3. It is OK to work with other students, but what you submitshould be your own work – not something copied from someoneelse.

P1: For the following matrices ? = [ 2.3 7.6 3.4 −5.8 ]and ? = [2.4 5.9 −6.7 9.0 ] find:

a. Matrix A time matrix B

b. Every element of matrix A times every element of matrix B

c. Determinant of matrix A

d. Transpose of matrix A

e. Subtract A from B

f. Inverse of matrix B

g. Square matrix A

h. Square every element in matrix A

i. R=inv(A)*B

j. S=A\B

P2: Let’s consider a system of 3 equations X+Y-2Z=0,X+Y+Z=1 and 2Y-Z+5=0.

a. Find the matrix of coefficients (A)

b. Find the matrix of outputs (B)

c. Solve to find the values of the variables inv(A)*B

d. Solve to find the values using equationToMatrix command(Note: you will need the symbolic library)

e. Solve using linsolve command (Note: you will need thesymbolic library)

P3: For the following control system polynomial2P3+P+P5-2P4+3P2+4=0 find the solution (roots of thepolynomial)

P4: For X=-3π up to 3πin intervals ofπ/100.

a. Plot Y1=sin(X) as a magenta line

b. Plot Y2=cos(X) as a black double dotted line c. Plot Y1 andY2 in the same plot without using the hold on/off command.

d. For Y3= Y1 times Y2, plot Y1, Y2 and Y3 in the same graph. Y3will be green line. Add title, axis label and a legend.

P5: For X=0 up to 2πin intervals of π/100 with thefollowing equations

Y4=sin(X), Y5=sin(X-0.25), Y6=sin (X-0.5), Y7=sin(X-0.75),Y8=sin(X)sin(X-0.75)

a. Plot Y4, Y5 and Y6 in the same plot. Add title, labels,legend. Plot them with different colors and line styles

b. Plot Y4, Y5, Y6 and Y7 as subplots. Add title, labels. Plotthem with different colors and line styles

c. Plot Y4 and Y8 in the same plot using the hold on/off. Addtitle, labels. Plot them with different colors and line styles

d. Plot Y5*Y6 and Y8 in the same plot without using the holdon/off. Add title, labels. Plot them with different colors and linestyles

e. Plot one of the Y equations as a 3D graph. Please add titleand labels

Answer & Explanation Solved by verified expert
3.6 Ratings (648 Votes)
MATLAB code is given below in bold lettersclcclose allclear all Question P1A 23 7634 58B 24 5967 90ABABdetAtransposeAABinvBA2A2R invABS AB Question    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students