- •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
1.2 Tasks for Laboratory Work
Problem 1.1. Tabulate the function y in the range with the step h. Output the table of function using for statement.
Variant |
y |
x1 |
x2 |
h |
1 |
|
60 |
100 |
2 |
2 |
|
1.2 |
2.4 |
0.1 |
3 |
|
10 |
50 |
2.5 |
4 |
|
10.2 |
12.4 |
0.11 |
5 |
|
3.5 |
4 |
0.025 |
6 |
|
40 |
60 |
1 |
7 |
|
0.75 |
1.8 |
0.035 |
8 |
|
1 |
8.5 |
0.5 |
9 |
|
1.9 |
3.8 |
0.1 |
10 |
|
4.5 |
9 |
0.25 |
11 |
|
1.3 |
2.25 |
0.05 |
12 |
|
12.6 |
34.6 |
1 |
13 |
|
1.1 |
3.3 |
0.1 |
Problem 1.2. Calculate the function y for given n and x :
Variant |
y |
Variant |
y |
1 |
|
8 |
|
2 |
|
9 |
|
3 |
|
10 |
|
4 |
|
11 |
|
5 |
|
12 |
|
6 |
|
13 |
|
7 |
|
|
|
Problem 1.3. Calculate the sum of the row with the given x and the accuracy and give the amount of the items:
Variant |
y |
Variant |
y |
1 |
|
8 |
|
2 |
|
9 |
|
3 |
|
10 |
|
4 |
|
11 |
|
5 |
|
12 |
|
6 |
|
13 |
|
7 |
|
|
|
Problem 1.4. Calculate the limit of the sequence with the given a and the accuracy and give the amount of the iterations:
, , k=1,2, …
n=2,3,…14 and corresponds the number of variant +1
These sequence tendencies to . Compare limit you receive and value .