- •Contents
- •1 Laboratory work №1. The loop statements in matlab programs
- •2 Laboratory work №2. The work with arrays in matlab
- •3 Laboratory work №3. The work with matrixes in matlab
- •3.2 Tasks for laboratory work ……………………………….25
- •3.3 Examples of performance of laboratory work …………..29
- •1 Laboratory work № 1 Loop statements in mAtlab programs
- •1.1 Loop Statements
- •1.2 Tasks for Laboratory Work
- •1.3 Example of Performance of Laboratory Work
- •1.4 The Test Questions
- •2 Laboratory work № 2 The Work with Arrays in maTlab
- •2.1 Arrays
- •Matlab functions for arrays (vectors)
- •If a is a vector, sum(a) returns the sum of the elements. If a is a matrix, sum(a) treats the columns of a as vectors, returning a row vector of the sums of each column. Example
- •2.2 Main algorithms for working with arrays
- •2.3 Tasks for Laboratory Work
- •2.3 Examples of Performance of Laboratory Work
- •2.4 Test Questions
- •3 Laboratory work № 3 The Work with Matrixes in matlab
- •3.1 Multidimensional Arrays
- •Some elementary matrix functions and operations of transformation and decomposition
- •3.2 Tasks for Laboratory Work
- •Variant 1
- •Variant 2
- •Variant 3
- •Variant 4
- •Variant 5
- •Variant 6
- •Variant 7
- •Variant 8
- •Variant 9
- •Variant 10
- •Variant 11
- •Variant 12
- •Variant 13
- •3.3 Example of Performance of Laboratory Work
- •4 The list of books
Variant 3
1. The integer m, n and matrix A(m,n) are given. For each row calculate the sum of all negative elements.
2. The integer n and square matrix A(n,n) are given. Count up the amount of odd elements which are placed
1) higher than main diagonal;
2) below than main diagonal;
3) on the main diagonal.
Create on the form the List box control which, allows user to select one or more items of task. (Set property Multiselected=2 Extended). Your program has to perform only selected items.
Variant 4
1. The integer m,n and matrix A(m,n) are given. Print elements of matrix, which are divided by 3 without rest.
2. The integer n and square matrix A(n,n) are given. Count up the amount of elements which, are the squares of integers which are placed
1) higher than main diagonal;
2) below than main diagonal;
3) on the main diagonal.
Create on the form the List box control which allows user to select one or more items of task. (Set property Multiselected=2 Extended). Your program has to perform only selected items.
Variant 5
1. The integer m, n and matrix A(m,n) are given. Print elements of the matrix, which divided by 5 without rest.
2. The integer n and square matrix A(n,n) are given. Count up the average value of positive elements which are placed
1) higher than main diagonal;
2) below than main diagonal;
3) on the main diagonal.
Create on the form the List box control which allows user to select one or more items of task. (Set property Multiselected=2 Extended). Your program has to perform only selected items.
Variant 6
1. The integer m, n and matrix A(m,n) are given. For each row calculate the sum of positive elements.
2. The integer n and square matrix A(n,n) are given. Count up the sum of even elements, which are placed
1) higher than main diagonal;
2) below than main diagonal;
3) on the main diagonal.
Create on the form the List box control which allows user to select one or more items of task. (Set property Multiselected=2 Extended). Your program has to perform only selected items.
Variant 7
1. The integer m, n and matrix A(m,n) are given. Find a row in which there are more then 2 negative elements.
2. The integer n and square matrix A(n,n) are given. Count up the average value of negative elements, which are placed
1) higher than side diagonal;
2) below than side diagonal;
3) on the side diagonal.
Create on the form the List box control which allows user to select one or more items of task. (Set property Multiselected=2 Extended). Your program has to perform only selected items.
Variant 8
1. The integer m,n and matrix A(m,n) are given. Redouble all negative elements.
2. The integer n and square matrix A(n,n) is given. Count up the average value of odd elements which are placed in
1) columns, which begin with negative elements;
2) columns, which begin with positive elements;
3) columns which begin with 0.
Create on the form the List box control which allows user to select one or more items of task. (Set property Multiselected=2 Extended). Your program has to perform only selected items.
