0% found this document useful (0 votes)
55 views

Basic Matlab Exercises

Uploaded by

s. magx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Basic Matlab Exercises

Uploaded by

s. magx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Basic MATLAB Exercises

Exercise 1:
Define the Matrices using MATLAB.
A= B=
1 2 3 4 1 1 1 1
6 8 1 5 1 1 1 1
9 4 2 7 1 1 1 1
9 4 7 2 1 1 1 1
C= D=
16 2 3 13 1 0 0 0
5 11 10 8 0 3 0 0
9 7 6 12 0 0 5 0
4 14 15 1 0 0 0 7
E= F=
1 0 0 0 3 6 9 12
0 1 0 0 18 24 3 15
0 0 0 1 27 12 6 21
1 0 0 0 27 12 21 6

Solve the following matrix operations:


3A + 4F 2DEF+4B
ABC/4F FEB/2CB
(2B – 3D) * (2ABC)
Exercise 2:

From the given matrices in Exercise 1, create the matrix shown


below:

T=
1 2 3 4 2 2 2 2 4 3 3 3
6 8 1 5 2 2 2 2 3 4 3 3
9 4 2 7 2 2 2 2 3 3 3 4
9 4 7 2 2 2 2 2 4 3 3 3
1 4 7 10 16 2 3 13 1 0 0 0
16 22 1 13 5 11 10 8 0 3 0 0
25 10 4 19 9 7 6 12 0 0 5 0
25 10 19 4 4 14 15 1 0 0 0 7
Exercise 3:

Create an m-file to evaluate the polynomials shown below.

(1) x3 –2x2 + 12 at x = 1.5


(2) x4 –2x + 6 at x = 2
Exercise 4:

Create a function m-file to evaluate the polynomial shown below.

(1) x2 + y –2x + 5 = 0

You might also like