Этот коммит содержится в:
2026-02-11 23:44:06 +03:00
родитель 941974a6b3
Коммит e112e9e0c2
11 изменённых файлов: 1272 добавлений и 0 удалений

Двоичные данные
ТЕМА1/assets/bar11.png Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.7 KiB

Двоичные данные
ТЕМА1/assets/graphic11.png Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 17 KiB

Двоичные данные
ТЕМА1/assets/histogram11.png Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 4.5 KiB

Двоичные данные
ТЕМА1/assets/pie11.PNG Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 56 KiB

Двоичные данные
ТЕМА1/assets/screen2.png Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 20 KiB

Двоичные данные
ТЕМА1/assets/screen3.png Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 171 KiB

Двоичные данные
ТЕМА1/assets/screen4.png Обычный файл

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 54 KiB

344
ТЕМА1/perem Обычный файл
Просмотреть файл

@@ -0,0 +1,344 @@
# Created by Octave 10.3.0, Wed Feb 11 23:18:16 2026 UTC <unknown@Redmi>
# name: A
# type: matrix
# rows: 4
# columns: 6
0.24612084228847705 0.79905181571859696 -1.4301715738783221 0.98938375189079664 -1.3819432683961064 0.30817139021210238
0.18829187399362238 -0.30383811017446982 0.11265153807199667 -0.38921934031141819 1.20913729380861 0.99877780929038906
1.1249837214844249 0.008192194328331015 -0.34760424052883748 -0.17645321058060659 1.4821799320426716 -0.66142165667575092
-1.1914164340660196 0.65953783854637871 0.46773882000777439 0.6105516471848782 -0.11569513974773467 0.26481021918013137
# name: B
# type: matrix
# rows: 4
# columns: 7
0.91792497331055822 0.47319407673939118 0.7198716674879172 0.0038881083115011039 0.13236501240405241 0.8162351972175943 0.78614350780988018
0.59485149691390893 0.32186305188475661 0.12345223397444982 0.59881996342681343 0.78491326913486736 0.85623935466593892 0.23900324492782277
0.10400918504553669 0.59963205438728906 0.72110013321319333 0.55133441211194256 0.2490905535288318 0.39099488340521982 0.30139503010708524
0.23271785025607483 0.27836755639517108 0.20292626739816755 0.48827707344674731 0.25064049840841807 0.8633688347690861 0.68343347638627328
# name: B1
# type: matrix
# rows: 4
# columns: 7
0.95808401161409551 0.68789103551317721 0.8484525133959574 0.062354697589685287 0.36382002749168774 0.90345735771955182 0.88664734128619604
0.77126616476668342 0.56732975586051948 0.35135770088963442 0.7738345840209091 0.88595331092268481 0.92533202401405024 0.48887958121384328
0.32250455042609349 0.7743591249460996 0.84917614969639443 0.74251896414296559 0.49908972492812531 0.62529583670868927 0.54899456291213411
0.48240838535008368 0.5276054931434766 0.4504733814535189 0.69876825446405855 0.50064008869488075 0.92917642822506319 0.82670035465474023
# name: B1D
# type: matrix
# rows: 4
# columns: 1
0.95808401161409551
0.56732975586051948
0.84917614969639443
0.69876825446405855
# name: B2
# type: matrix
# rows: 4
# columns: 7
-0.085639620121467086 -0.74824966441315721 -0.32868232245871637 -5.5498325348755939 -2.0221919271681768 -0.20305273366455273 -0.24061592330782486
-0.51944348960667197 -1.1336291286111517 -2.0919009671663487 -0.51279428793626314 -0.24218205248217847 -0.1552053219899189 -1.4312781500389335
-2.2632760659950018 -0.51143905456404803 -0.32697727032335189 -0.59541373539631903 -1.3899387798384069 -0.93906080500254663 -1.199333482285065
-1.457928502307456 -1.2788128932495979 -1.5949125807061693 -0.71687226079490496 -1.3837356437971757 -0.14691329244796922 -0.38062595544613326
# name: B3
# type: matrix
# rows: 4
# columns: 7
0.79434281511988802 0.45573170786825268 0.65928818542413903 0.003888098515169326 0.13197883407152497 0.72857222596552884 0.70763362281366127
0.56038576571088039 0.31633448850362011 0.12313889482430597 0.56366815428190564 0.70676382605041788 0.75538362388792013 0.23673432245299425
0.10382175944148946 0.56433875656159693 0.66021135923281915 0.52382438227808181 0.24652268308017591 0.38110840349245495 0.29685264183657595
0.23062295773689348 0.27478641223061279 0.2015364129705958 0.46910499569172887 0.24802449532881657 0.7600362123736063 0.63145908999993827
# name: BS1
# type: matrix
# rows: 4
# columns: 7
0.10400918504553669 0.27836755639517108 0.12345223397444982 0.0038881083115011039 0.13236501240405241 0.39099488340521982 0.23900324492782277
0.23271785025607483 0.32186305188475661 0.20292626739816755 0.48827707344674731 0.2490905535288318 0.8162351972175943 0.30139503010708524
0.59485149691390893 0.47319407673939118 0.7198716674879172 0.55133441211194256 0.25064049840841807 0.85623935466593892 0.68343347638627328
0.91792497331055822 0.59963205438728906 0.72110013321319333 0.59881996342681343 0.78491326913486736 0.8633688347690861 0.78614350780988018
# name: BS2
# type: matrix
# rows: 4
# columns: 7
0.23271785025607483 0.27836755639517108 0.20292626739816755 0.48827707344674731 0.25064049840841807 0.8633688347690861 0.68343347638627328
0.59485149691390893 0.32186305188475661 0.12345223397444982 0.59881996342681343 0.78491326913486736 0.85623935466593892 0.23900324492782277
0.91792497331055822 0.47319407673939118 0.7198716674879172 0.0038881083115011039 0.13236501240405241 0.8162351972175943 0.78614350780988018
0.10400918504553669 0.59963205438728906 0.72110013321319333 0.55133441211194256 0.2490905535288318 0.39099488340521982 0.30139503010708524
# name: C
# type: double_range
# base, limit, increment
4 27 1
# name: D
# type: matrix
# rows: 4
# columns: 6
4 8 12 16 20 24
5 9 13 17 21 25
6 10 14 18 22 26
7 11 15 19 23 27
# name: D1
# type: scalar
22
# name: D2
# type: matrix
# rows: 1
# columns: 3
18 22 26
# name: D3
# type: matrix
# rows: 2
# columns: 3
13 17 21
14 18 22
# name: D5
# type: matrix
# rows: 2
# columns: 3
6 14 26
7 15 27
# name: DB
# type: diagonal matrix
# rows: 4
# columns: 4
0.95808401161409551
0.56732975586051948
0.84917614969639443
0.69876825446405855
# name: DDD
# type: matrix
# rows: 4
# columns: 6
64 512 1728 4096 8000 13824
125 729 2197 4913 9261 15625
216 1000 2744 5832 10648 17576
343 1331 3375 6859 12167 19683
# name: DL
# type: bool matrix
# rows: 4
# columns: 6
0 0 0 0 1 1
0 0 0 0 1 1
0 0 0 0 1 1
0 0 0 0 1 1
# name: DP1
# type: matrix
# rows: 1
# columns: 6
840 7920 32760 93024 212520 421200
# name: DS1
# type: matrix
# rows: 1
# columns: 6
22 38 54 70 86 102
# name: DS2
# type: matrix
# rows: 4
# columns: 1
84
90
96
102
# name: Dstolb
# type: matrix
# rows: 24
# columns: 1
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# name: Dsum
# type: scalar
22.547300573537278
# name: Dsum2
# type: scalar
-0.057010896737607175
# name: E
# type: matrix
# rows: 7
# columns: 6
0.17767093945614132 0.70706935336534538 -1.173082128832251 0.80038585900818104 -0.42202710594727871 0.8698348275274308
0.51999174060766173 0.46881856356758922 -0.7187216821422252 0.40704597520793478 0.59180607482198755 0.14439949713480463
0.76987669516872537 0.67745021372852077 -1.1713738829353757 0.66083586735303246 0.19977145868526131 -0.07806909104679903
0.15221078662896773 0.14771631826040368 0.098637290496224495 -0.028391835586501338 1.4793679221774232 0.36392253357306809
0.16197618775946795 0.034627429946604414 -0.070233632805748764 -0.065467490963922834 1.1063461004652868 0.72636334405911018
-0.22665353246791098 0.96468359022958661 -0.80298005588903087 0.93244388677563006 0.38695739165251403 1.0767496091829323
-0.23670070157089571 1.0087704275287068 -0.88249383745417664 1.0488622419919285 -0.42976625814433317 0.46260904363991667
# name: F
# type: matrix
# rows: 4
# columns: 13
0.24612084228847705 0.79905181571859696 -1.4301715738783221 0.98938375189079664 -1.3819432683961064 0.30817139021210238 0.91792497331055822 0.47319407673939118 0.7198716674879172 0.0038881083115011039 0.13236501240405241 0.8162351972175943 0.78614350780988018
0.18829187399362238 -0.30383811017446982 0.11265153807199667 -0.38921934031141819 1.20913729380861 0.99877780929038906 0.59485149691390893 0.32186305188475661 0.12345223397444982 0.59881996342681343 0.78491326913486736 0.85623935466593892 0.23900324492782277
1.1249837214844249 0.008192194328331015 -0.34760424052883748 -0.17645321058060659 1.4821799320426716 -0.66142165667575092 0.10400918504553669 0.59963205438728906 0.72110013321319333 0.55133441211194256 0.2490905535288318 0.39099488340521982 0.30139503010708524
-1.1914164340660196 0.65953783854637871 0.46773882000777439 0.6105516471848782 -0.11569513974773467 0.26481021918013137 0.23271785025607483 0.27836755639517108 0.20292626739816755 0.48827707344674731 0.25064049840841807 0.8633688347690861 0.68343347638627328
# name: FF
# type: matrix
# rows: 2
# columns: 4
1 1 1 1
1 1 1 1
# name: G
# type: matrix
# rows: 4
# columns: 6
0.98448336915390822 6.3924145257487757 -17.162058886539864 15.830140030252746 -27.638865367922129 7.3961133650904571
0.94145936996811186 -2.7345429915702284 1.4644699949359568 -6.616728785294109 25.391883169980812 24.969445232259726
6.7499023289065496 0.08192194328331015 -4.8664593674037251 -3.1761577904509188 32.607958504938779 -17.196963073569524
-8.3399150384621379 7.2549162240101657 7.0160823001166159 11.600481296512687 -2.6609882141978973 7.1498759178635467
# name: GG
# type: matrix
# rows: 5
# columns: 5
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
# name: H
# type: sq_string
# elements: 1
# length: 24
This is a symbols vector
# name: L
# type: complex matrix
# rows: 1
# columns: 2
(-2,23.100000000000001) (3,-5.5999999999999996)
# name: M
# type: matrix
# rows: 4
# columns: 6
0.21877408203420182 1.4205365612775056 -3.8137908636755253 3.5178088956117213 -6.1419700817604728 1.6435807477978794
0.20921319332624708 -0.60767622034893964 0.32543777665243484 -1.4703841745098021 5.6426407044401801 5.5487656071688285
1.4999782953125667 0.018204876285180034 -1.0814354149786056 -0.70581284232242636 7.2462130010975061 -3.8215473496821164
-1.8533144529915861 1.6122036053355924 1.5591294000259146 2.5778847325583749 -0.59133071426619943 1.5888613150807882
# name: NN
# type: matrix
# rows: 1
# columns: 20
11.5 12.689473684210526 13.878947368421052 15.06842105263158 16.257894736842104 17.44736842105263 18.63684210526316 19.826315789473686 21.015789473684212 22.205263157894738 23.394736842105264 24.58421052631579 25.773684210526316 26.963157894736842 28.152631578947371 29.342105263157897 30.531578947368423 31.721052631578949 32.910526315789475 34.100000000000001
# name: ans
# type: scalar
0
# name: dinv
# type: matrix
# rows: 4
# columns: 4
0.25212373551999584 0.16746220206967982 0.066140555414957003 0.042245937813034228
0.16746220206967982 0.55199892813617957 -0.1285282645120206 -0.020491011972343202
0.066140555414957003 -0.1285282645120206 0.47762991701558932 0.333178791140397
0.042245937813034228 -0.020491011972343202 0.333178791140397 0.64164054568240592
# name: elem
# type: scalar
28
# name: i
# type: scalar
19
# name: k
# type: scalar
7
# name: nm
# type: matrix
# rows: 1
# columns: 2
4 7
# name: t
# type: scalar
57.948365375418142

24
ТЕМА1/prog1.m Обычный файл
Просмотреть файл

@@ -0,0 +1,24 @@
>> D1=D(3,5)
D1 = 22
>> D2=D(3,4:end)
D2 =
18 22 26
>> D3=D(2:3,3:5)
D3 =
13 17 21
14 18 22
>> D4=D(16:20)
D4 =
19 20 21 22 23
>> D5=D(3:4,[1,3,6])
D5 =
6 14 26
7 15 27

904
ТЕМА1/report.md Обычный файл
Просмотреть файл

@@ -0,0 +1,904 @@
\# Отчет по теме 1
Иванов Владимир, А-03-24
\## 1. Изучение среды GNU Octave
Запущена среда GNU Octave. Визуально изучены компоненты графического интерфейса: главное меню, командное окно, окно текущей папки, область переменных и другие элементы.
\## 2. Настройка текущего каталога
Нажал на окно рядом с \*Текущая папка:\* и установил путь к папке ТЕМА1:
!\[Скриншот выбора текущей папки](assets/screen2.png)
\## 3. Настройка окон интерфейса
В главном меню «Окно» отмечены галочками для отображения:
\- Командное окно
\- Журнал выполненных команд
\- Диспетчер файлов
\- Область переменных
\- Редактор
Все указанные окна появились в интерфейсе среды:
!\[Скриншот выбора текущей папки](assets/screen3.png)
\## 4. Установка путей и работа с файлами
В меню «Правка» + «Установить путь» добавлены пути к папкам TEMA1 и TEMA2. В окне «Диспетчер файлов» отображен список файлов текущей папки.
!\[Скриншот выбора текущей папки](assets/screen4.png)
\## 5. Работа со справкой
Изучена система помощи:
\- Открыта документация через «Справка» + «Документация» + «На диске»
\- Просмотрен GNU Octave Manual
\- Проверен список пакетов через «Справка» + «Пакеты Octave»
\- Использована команда `help` для получения справки по функциям
```matlab
>> help randn
'randn' is a built-in function from the file libinterp/corefcn/rand.cc
&nbsp;-- X = randn (N)
&nbsp;-- X = randn (M, N, ...)
&nbsp;-- X = randn (\[M N ...])
&nbsp;-- X = randn (..., "single")
&nbsp;-- X = randn (..., "double")
&nbsp;-- V = randn ("state")
&nbsp;-- randn ("state", V)
&nbsp;-- randn ("state", "reset")
&nbsp;-- V = randn ("seed")
&nbsp;-- randn ("seed", V)
&nbsp;-- randn ("seed", "reset")
&nbsp; Return a matrix with normally distributed random elements having
&nbsp; zero mean and variance one.
&nbsp; The arguments are handled the same as the arguments for 'rand'.
&nbsp; By default, 'randn' uses the Marsaglia and Tsang "Ziggurat
&nbsp; technique" to transform from a uniform to a normal distribution.
&nbsp; The class of the value returned can be controlled by a trailing
&nbsp; "double" or "single" argument. These are the only valid classes.
&nbsp; Reference: G. Marsaglia and W.W. Tsang, 'Ziggurat Method for
&nbsp; Generating Random Variables', J. Statistical Software, vol 5, 2000,
&nbsp; <https://www.jstatsoft.org/v05/i08/>
&nbsp; See also: rand, rande, randg, randp.
Additional help for built-in functions and operators is
available in the online version of the manual. Use the command
'doc <topic>' to search the manual index.
Help and information about Octave is also available on the WWW
at https://www.octave.org and via the help@octave.org
mailing list.
```
\## 6. Создание матриц и векторов
```matlab
&nbsp;
>> A=randn(4,6)
A =
&nbsp; 2.4612e-01 7.9905e-01 -1.4302e+00 9.8938e-01 -1.3819e+00 3.0817e-01
&nbsp; 1.8829e-01 -3.0384e-01 1.1265e-01 -3.8922e-01 1.2091e+00 9.9878e-01
&nbsp; 1.1250e+00 8.1922e-03 -3.4760e-01 -1.7645e-01 1.4822e+00 -6.6142e-01
&nbsp; -1.1914e+00 6.5954e-01 4.6774e-01 6.1055e-01 -1.1570e-01 2.6481e-01
>> B=rand(4,7)
B =
&nbsp; 9.1792e-01 4.7319e-01 7.1987e-01 3.8881e-03 1.3237e-01 8.1624e-01 7.8614e-01
&nbsp; 5.9485e-01 3.2186e-01 1.2345e-01 5.9882e-01 7.8491e-01 8.5624e-01 2.3900e-01
&nbsp; 1.0401e-01 5.9963e-01 7.2110e-01 5.5133e-01 2.4909e-01 3.9099e-01 3.0140e-01
&nbsp; 2.3272e-01 2.7837e-01 2.0293e-01 4.8828e-01 2.5064e-01 8.6337e-01 6.8343e-01
>> C = 4:27
C =
&nbsp; 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
>> H='This is a symbols vector'
H = This is a symbols vector
>> L=\[-2+23.1j, 3-5.6j]
L =
&nbsp; -2.0000 + 23.1000i 3.0000 - 5.6000i
```
\## 7. Операции с матрицами
```matlab
D=reshape(C,\[],6)
D =
&nbsp; 4 8 12 16 20 24
&nbsp; 5 9 13 17 21 25
&nbsp; 6 10 14 18 22 26
&nbsp; 7 11 15 19 23 27
>> E=B'\*A
E =
&nbsp; -1.062020 -0.051115 0.074274 1.889323 -0.159865 -0.797471
&nbsp; -0.987574 0.120358 1.538011 1.983992 1.375455 -1.009796
&nbsp; -1.786521 0.544003 -0.841670 2.256538 1.319305 -1.911457
&nbsp; -1.353524 -0.205707 -1.155552 1.282056 0.153180 -1.225409
&nbsp; -1.492714 0.601927 -0.245364 2.303039 1.120912 -1.567984
&nbsp; -0.808763 -0.300447 -1.075886 0.595356 -0.332495 -0.644339
&nbsp; -1.590215 0.232552 -2.454290 1.630394 -0.485993 -1.414100
>> F=\[A,B]
F =
&nbsp;Columns 1 through 5:
&nbsp; 2.4612e-01 7.9905e-01 -1.4302e+00 9.8938e-01 -1.3819e+00
&nbsp; 1.8829e-01 -3.0384e-01 1.1265e-01 -3.8922e-01 1.2091e+00
&nbsp; 1.1250e+00 8.1922e-03 -3.4760e-01 -1.7645e-01 1.4822e+00
&nbsp; -1.1914e+00 6.5954e-01 4.6774e-01 6.1055e-01 -1.1570e-01
&nbsp;Columns 6 through 10:
&nbsp; 3.0817e-01 9.1792e-01 4.7319e-01 7.1987e-01 3.8881e-03
&nbsp; 9.9878e-01 5.9485e-01 3.2186e-01 1.2345e-01 5.9882e-01
&nbsp; -6.6142e-01 1.0401e-01 5.9963e-01 7.2110e-01 5.5133e-01
&nbsp; 2.6481e-01 2.3272e-01 2.7837e-01 2.0293e-01 4.8828e-01
&nbsp;Columns 11 through 13:
&nbsp; 1.3237e-01 8.1624e-01 7.8614e-01
&nbsp; 7.8491e-01 8.5624e-01 2.3900e-01
&nbsp; 2.4909e-01 3.9099e-01 3.0140e-01
&nbsp; 2.5064e-01 8.6337e-01 6.8343e-01
>> G=A.\*D
G =
&nbsp; -2.1133 -7.9531 5.0795 17.7987 -31.0683 2.7012
&nbsp; -1.9133 9.9180 20.5493 29.0286 36.1644 -17.3466
&nbsp; -2.1444 -1.3123 4.7728 -1.3861 30.2171 -15.7074
&nbsp; -8.9271 1.3795 -49.8654 10.4939 -15.5500 -32.1418
>> M=G./4.5
M =
&nbsp; -0.4696 -1.7674 1.1288 3.9553 -6.9041 0.6003
&nbsp; -0.4252 2.2040 4.5665 6.4508 8.0365 -3.8548
&nbsp; -0.4765 -0.2916 1.0606 -0.3080 6.7149 -3.4905
&nbsp; -1.9838 0.3065 -11.0812 2.3320 -3.4556 -7.1426
>> DDD=D.^3
DDD =
&nbsp; 64 512 1728 4096 8000 13824
&nbsp; 125 729 2197 4913 9261 15625
&nbsp; 216 1000 2744 5832 10648 17576
&nbsp; 343 1331 3375 6859 12167 19683
>> DL=D>=20
DL =
&nbsp; 0 0 0 0 1 1
&nbsp; 0 0 0 0 1 1
&nbsp; 0 0 0 0 1 1
&nbsp; 0 0 0 0 1 1
>> Dstolb=D(:)
Dstolb =
&nbsp; 4
&nbsp; 5
&nbsp; 6
&nbsp; 7
&nbsp; 8
&nbsp; 9
&nbsp; 10
&nbsp; 11
&nbsp; 12
&nbsp; 13
&nbsp; 14
&nbsp; 15
&nbsp; 16
&nbsp; 17
&nbsp; 18
&nbsp; 19
&nbsp; 20
&nbsp; 21
&nbsp; 22
&nbsp; 23
&nbsp; 24
&nbsp; 25
&nbsp; 26
&nbsp; 27
```
\## 8. Стандартные функции
```matlab
B1=sqrt(B)
B1 =
&nbsp; 0.830196 0.794780 0.626818 0.701587 0.643416 0.574820 0.588671
&nbsp; 0.743569 0.875002 0.919798 0.514131 0.950974 0.127716 0.642313
&nbsp; 0.372137 0.886932 0.853329 0.795333 0.668526 0.557392 0.051291
&nbsp; 0.585250 0.250013 0.883270 0.775134 0.776123 0.636652 0.989364
>> B2=log(B)
B2 =
&nbsp; -0.372186 -0.459381 -0.934198 -0.708822 -0.881929 -1.107396 -1.059777
&nbsp; -0.592586 -0.267058 -0.167202 -1.330552 -0.100537 -4.115892 -0.885359
&nbsp; -1.976984 -0.239973 -0.317219 -0.457989 -0.805361 -1.168973 -5.940491
&nbsp; -1.071431 -2.772484 -0.248248 -0.509438 -0.506889 -0.903063 -0.021386
>> B3=sin(B)
B3 =
&nbsp; 6.3594e-01 5.9050e-01 3.8287e-01 4.7259e-01 4.0226e-01 3.2444e-01 3.3964e-01
&nbsp; 5.2515e-01 6.9299e-01 7.4865e-01 2.6126e-01 7.8602e-01 1.6311e-02 4.0096e-01
&nbsp; 1.3804e-01 7.0799e-01 6.6551e-01 5.9121e-01 4.3220e-01 3.0571e-01 2.6307e-03
&nbsp; 3.3586e-01 6.2466e-02 7.0340e-01 5.6533e-01 5.6659e-01 3.9432e-01 8.2985e-01
>> k=length(B1)
k = 7
>> nm=size(B1)
nm =
&nbsp; 4 7
>> elem=numel(B1)
elem = 28
>> NN=linspace(11.5,34.1,20)
NN =
&nbsp;Columns 1 through 14:
&nbsp; 11.500 12.689 13.879 15.068 16.258 17.447 18.637 19.826 21.016 22.205 23.395 24.584 25.774 26.963
&nbsp;Columns 15 through 20:
&nbsp; 28.153 29.342 30.532 31.721 32.911 34.100
>> FF=ones(2,4)
FF =
&nbsp; 1 1 1 1
&nbsp; 1 1 1 1
>> GG=zeros(5)
GG =
&nbsp; 0 0 0 0 0
&nbsp; 0 0 0 0 0
&nbsp; 0 0 0 0 0
&nbsp; 0 0 0 0 0
&nbsp; 0 0 0 0 0
>> B1D=diag(B1)
B1D =
&nbsp; 0.8302
&nbsp; 0.8750
&nbsp; 0.8533
&nbsp; 0.7751
>> DB=diag(B1D)
DB =
Diagonal Matrix
&nbsp; 0.8302 0 0 0
&nbsp; 0 0.8750 0 0
&nbsp; 0 0 0.8533 0
&nbsp; 0 0 0 0.7751
>> BS1=sort(B)
BS1 =
&nbsp; 1.3849e-01 6.2507e-02 3.9290e-01 2.6433e-01 4.1398e-01 1.6311e-02 2.6307e-03
&nbsp; 3.4252e-01 6.3167e-01 7.2817e-01 4.9222e-01 4.4693e-01 3.1069e-01 3.4653e-01
&nbsp; 5.5290e-01 7.6563e-01 7.8017e-01 6.0083e-01 6.0237e-01 3.3042e-01 4.1257e-01
&nbsp; 6.8923e-01 7.8665e-01 8.4603e-01 6.3255e-01 9.0435e-01 4.0533e-01 9.7884e-01
>> BS2=sortrows(B,2)
BS2 =
&nbsp; 3.4252e-01 6.2507e-02 7.8017e-01 6.0083e-01 6.0237e-01 4.0533e-01 9.7884e-01
&nbsp; 6.8923e-01 6.3167e-01 3.9290e-01 4.9222e-01 4.1398e-01 3.3042e-01 3.4653e-01
&nbsp; 5.5290e-01 7.6563e-01 8.4603e-01 2.6433e-01 9.0435e-01 1.6311e-02 4.1257e-01
&nbsp; 1.3849e-01 7.8665e-01 7.2817e-01 6.3255e-01 4.4693e-01 3.1069e-01 2.6307e-03
>> DS1=sum(D)
DS1 =
&nbsp; 22 38 54 70 86 102
>> DS2=sum(D,2)
DS2 =
&nbsp; 84
&nbsp; 90
&nbsp; 96
&nbsp; 102
>> DP1=prod(D)
DP1 =
&nbsp; 840 7920 32760 93024 212520 421200
>> dt=det(A\*A')
dt = 727.40
>> dinv=inv(A\*A')
dinv =
&nbsp; 0.283810 -0.061584 0.278944 -0.011754
&nbsp; -0.061584 0.190474 -0.271478 0.037051
&nbsp; 0.278944 -0.271478 0.932179 -0.026774
&nbsp; -0.011754 0.037051 -0.026774 0.076090
```
\## 9. Работа с индексацией элементов матриц
```matlab
D1=D(3,5)
D1 = 22
>> D2=D(3,4:end)
D2 =
&nbsp; 18 22 26
>> D3=D(2:3,3:5)
D3 =
&nbsp; 13 17 21
&nbsp; 14 18 22
>> D4=D(16:20)
D4 =
&nbsp; 19 20 21 22 23
>> D5=D(3:4,\[1,3,6])
D5 =
&nbsp; 6 14 26
&nbsp; 7 15 27
```
\## 10. Управляющие конструкции
```matlab
Dsum=0
Dsum = 0
>> for i=1:6
Dsum=Dsum+sqrt(D(2,i))\\
endfor
Dsum = 2.2361
Dsum = 5.2361
Dsum = 8.8416
Dsum = 12.965
Dsum = 17.547
Dsum = 22.547
>> Dsum2=0;i=1
i = 1
>> while (D(i)<22)
Dsum2=Dsum2+sin(D(i))
i=i+1
endwhile
Dsum2 = -0.7568
i = 2
Dsum2 = -1.7157
i = 3
Dsum2 = -1.9951
i = 4
Dsum2 = -1.3382
i = 5
Dsum2 = -0.3488
i = 6
Dsum2 = 0.063321
i = 7
Dsum2 = -0.4807
i = 8
Dsum2 = -1.4807
i = 9
Dsum2 = -2.0173
i = 10
Dsum2 = -1.5971
i = 11
Dsum2 = -0.6065
i = 12
Dsum2 = 0.043799
i = 13
Dsum2 = -0.2441
i = 14
Dsum2 = -1.2055
i = 15
Dsum2 = -1.9565
i = 16
Dsum2 = -1.8066
i = 17
Dsum2 = -0.8937
i = 18
Dsum2 = -0.057011
i = 19
>> if (D(3,5)>=20)
printf('D(3,5)>=20')
else
printf('D(3,5)<20')
endif
D(3,5)>=20>>
```
\## 11. Графические функции
```matlab
>> graphics\_toolkit('gnuplot')
>> plot(D(1,:),B(\[2,4],1:6))
>>
>> hist(A(:),6)
>>
>>
>> pie(D(1,:))
>> bar(D(1,:))
```
!\[график](assets/graphic11.png)
!\[гистограмма](assets/histogram11.png)
!\[круговая диаграмма](assets/pie11.png)
!\[ступенчатая диаграмма](assets/bar11.png)
\## 12. Работа с текстовым редактором
Создан файл Prog1.m с командами из пункта 9. Файл сохранен в папке TEMA1/assets. Программа успешно запущена как через клавишу F5, так и через ввод имени файла в командной строке.
\## 13. Сохранение и загрузка переменных
Содержимое области переменных сохранено в файл Perem. После перезапуска среды и установки пути к папке TEMA1 переменные успешно загружены из файла Perem. Команды из предыдущего сеанса отображены в журнале выполненных команд.

0
ТЕМА1/task.md Обычный файл
Просмотреть файл