0% found this document useful (0 votes)
10 views1 page

Sheet 2

Matlab
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)
10 views1 page

Sheet 2

Matlab
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/ 1

Mechatronics Program

Sheet (2) Programing for Mechatronics Applications

1. Use the MATLAB built-in rand function to define the matrix A8x10 and show how to use
MATLAB to implement the following matrix operations:
1. Eliminate the 3th row of matrix A
2. Eliminate the 5th column of matrix A
3. Covert the matrix A to one column.
4. Create a new matrix consists of rows 1,5,3,7,4 of matrix A
5. Create a new matrix consists of columns 1,3,9,5,7,6,4 of matrix A

2. Use the MATLAB built-in rand function to define a square matrix A5x5 and show how to
use MATLAB to implement the following matrix operations:
1. Obtain the upper triangular matrix of A
2. Obtain the lower triangular matrix of A
3. Obtain the diagonal matrix of A
4. Obtain the summation of principle diagonal elements.
5. Obtain the summation of each column expressed as a row vector.

3. Use the MATLAB built-in rand function to define a raw vector A1x15 and show how to use
MATLAB to implement the following operations:
1. Obtain the greater element of A
2. Obtain the smaller element of A
3. Rearrange the elements of A in ascending order.
4. Obtain the summation of vector elements.
5. Obtain the product of vector elements.

4. Use MATLAB to find the solution of the following linear systems:


2x1 + 3x 2 + 4x 3 − 5x 4 + 7x 5 = −35 97x1 + 17x 2 + 95x 3 +41x 4 + 7x 5 = 37
8x1 − 2x 2 − 3x 3 + 9x 4 + 3x 5 = 53 40x1 + 4x 2 + 45x 3 +29x 4 + 72x 5 = 30
4x 2 + 6x 3 − 3x 4 − 2x 5 = −33 and 13x1 + 47x 2 + 53x 3 +28x 4 + 76x 5 = 37
5x1 − 7x 2 + 8x 3 + 3x 4 − 9x 5 = −19 72x1 + 9x 2 + 6x 3 +75x 4 + 65x 5 = 70
3x1 + 5x 2 − 2x 3 + 4x 4 + 6x 5 = 27 89x1 + 65x 2 + 49x 3 +9x 4 + 81x 5 = 16

You might also like