diff --git a/ТЕМА1/assets/Perem b/ТЕМА1/assets/Perem new file mode 100644 index 0000000..c2315c2 --- /dev/null +++ b/ТЕМА1/assets/Perem @@ -0,0 +1,27 @@ +# Created by Octave 8.3.0, Wed Feb 11 12:10:39 2026 GMT +# name: A +# type: matrix +# rows: 4 +# columns: 6 + 0.056365880558935405 -0.6434334125716934 -1.2840876931846781 0.20534503086164593 -0.263216942022649 0.047362790464925551 + 1.3271804840782049 0.75097735419432088 -0.72310402882429681 0.31172273696229502 1.3973263414704247 -0.36304925836684793 + -0.17615082026636267 -1.8408171917435594 -0.40311322428953017 -0.82338327901502317 -1.5846025552855747 -0.28538899171428034 + -0.93907550039929144 -0.28887758040856637 -0.61866712712876926 -0.06277710653086202 -0.85613766058839624 -0.65648166842657318 + + +# name: B +# type: matrix +# rows: 4 +# columns: 7 + 0.49833625898575062 0.056737285185249897 0.17810226668778606 0.092986314963789285 0.79478027075293545 0.7105903401258018 0.00016741211446980042 + 0.12419253022817811 0.23948121123719412 0.56070362014992403 0.11965481816186607 0.59666303641515184 0.16005732833221953 0.17258625973576469 + 0.71380679795325908 0.15313318602679316 0.14088442709647575 0.13873164933404036 0.10712608417455027 0.89840654215662563 0.022510661567187729 + 0.39442294880487261 0.13218809386874808 0.48911935616500413 0.33429980199932841 0.60627792713082562 0.1312069246395795 0.10638903689214241 + + +# name: C +# type: double_range +# base, limit, increment +4 27 1 + + diff --git a/ТЕМА1/assets/Prog1.m b/ТЕМА1/assets/Prog1.m new file mode 100644 index 0000000..3089023 --- /dev/null +++ b/ТЕМА1/assets/Prog1.m @@ -0,0 +1,5 @@ +D1=D(3,5) +D2=D(3,4:end) +D3=D(2:3,3:5) +D4=D(16:20) +D5=D(3:4,[1,3,6]) diff --git a/ТЕМА1/assets/figure 3.png b/ТЕМА1/assets/figure 3.png new file mode 100644 index 0000000..197655c Binary files /dev/null and b/ТЕМА1/assets/figure 3.png differ diff --git a/ТЕМА1/assets/figure 4.png b/ТЕМА1/assets/figure 4.png new file mode 100644 index 0000000..28d2e5a Binary files /dev/null and b/ТЕМА1/assets/figure 4.png differ diff --git a/ТЕМА1/assets/figure 5.png b/ТЕМА1/assets/figure 5.png new file mode 100644 index 0000000..033a775 Binary files /dev/null and b/ТЕМА1/assets/figure 5.png differ diff --git a/ТЕМА1/assets/figure 7.png b/ТЕМА1/assets/figure 7.png new file mode 100644 index 0000000..eabcc41 Binary files /dev/null and b/ТЕМА1/assets/figure 7.png differ diff --git a/ТЕМА1/assets/figure 8.png b/ТЕМА1/assets/figure 8.png new file mode 100644 index 0000000..9aa59fd Binary files /dev/null and b/ТЕМА1/assets/figure 8.png differ diff --git a/ТЕМА1/assets/figure 9.png b/ТЕМА1/assets/figure 9.png new file mode 100644 index 0000000..9a3b8ab Binary files /dev/null and b/ТЕМА1/assets/figure 9.png differ diff --git a/ТЕМА1/assets/figure1.png b/ТЕМА1/assets/figure1.png new file mode 100644 index 0000000..74d0e27 Binary files /dev/null and b/ТЕМА1/assets/figure1.png differ diff --git a/ТЕМА1/assets/figure2.png b/ТЕМА1/assets/figure2.png new file mode 100644 index 0000000..26cf90b Binary files /dev/null and b/ТЕМА1/assets/figure2.png differ diff --git a/ТЕМА1/assets/figure6.emf b/ТЕМА1/assets/figure6.emf new file mode 100644 index 0000000..06d6241 Binary files /dev/null and b/ТЕМА1/assets/figure6.emf differ diff --git a/ТЕМА1/assets/figure6.png b/ТЕМА1/assets/figure6.png new file mode 100644 index 0000000..6bf380b Binary files /dev/null and b/ТЕМА1/assets/figure6.png differ diff --git a/ТЕМА1/report.md b/ТЕМА1/report.md index e69de29..7db480a 100644 --- a/ТЕМА1/report.md +++ b/ТЕМА1/report.md @@ -0,0 +1,394 @@ +# Отчет по теме 1 + +Пахомов Илья, А-03-24 + +## 1 Изучение среды GNU Octave + +## 2 Настройка текущего каталога + +Нажал на окно рядом с *Текущая папка:* и установил путь к папке ТЕМА1: + +![Скриншот выбора текущей папки](assets/figure1.png) + +## 3 Настроил предложение «Окно». + +![Скриншот предложения "Окно"](assets/figure2.png) + +## 4 Отобразил список файлов, размещённых в текущей папке + +![Скриншот списка файлов текущей папки](assets/figure3.png) + +## 5 Изучил работу систем помощи + +## 6 Создание матриц и векторов + +```matlab + +>> A=randn(4,6) +A = + + 0.604425 0.467559 0.210945 0.101826 -0.697722 -0.457551 + -0.593429 1.472239 -1.540640 -0.095893 0.881864 0.508873 + -0.729307 0.637046 -0.271485 0.132082 1.452585 1.625484 + 1.310112 -0.050250 -1.202923 -0.501098 -1.113930 1.599730 + +>> B=rand(4,7) +B = + + 7.4235e-02 7.7887e-01 1.9481e-02 1.6233e-02 6.3604e-01 5.6349e-03 2.1646e-01 + 2.0576e-01 3.7398e-02 4.7933e-01 1.4731e-01 4.0984e-01 2.8150e-01 6.4308e-01 + 7.3637e-01 2.2485e-01 7.6445e-01 9.7867e-01 2.3870e-03 5.1378e-01 9.0480e-01 + 4.1237e-01 5.2761e-01 4.9420e-01 3.8474e-01 6.0314e-01 3.2191e-01 7.3812e-01 + +>> C=4:27 +C = + + 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 = + + -2.0000 + 23.1000i 3.0000 - 5.6000i +``` + +## 7 Выполнил следующие операции + +```matlab + + D=reshape(C,[],6) +D = + + 4 8 12 16 20 24 + 5 9 13 17 21 25 + 6 10 14 18 22 26 + 7 11 15 19 23 27 + +>> E=B'*A +E = + + -0.074012 0.786010 -0.997306 -0.121551 0.739933 1.927378 + 0.975826 0.535953 -0.589034 -0.158964 -0.771571 0.872175 + -0.182735 1.176948 -1.536379 -0.190652 0.969032 2.268178 + -0.287301 0.828586 -0.952033 -0.076002 1.111604 2.273822 + 0.929671 0.871975 -1.223421 -0.276453 -0.750748 0.886278 + -0.116602 0.728187 -0.959212 -0.119869 0.632026 1.490773 + 0.056355 1.587275 -2.078630 -0.289989 0.908164 2.879735 + +>> F=[A,B] +F = + + Columns 1 through 10: + + 6.0443e-01 4.6756e-01 2.1095e-01 1.0183e-01 -6.9772e-01 -4.5755e-01 7.4235e-02 7.7887e-01 1.9481e-02 1.6233e-02 + -5.9343e-01 1.4722e+00 -1.5406e+00 -9.5893e-02 8.8186e-01 5.0887e-01 2.0576e-01 3.7398e-02 4.7933e-01 1.4731e-01 + -7.2931e-01 6.3705e-01 -2.7148e-01 1.3208e-01 1.4526e+00 1.6255e+00 7.3637e-01 2.2485e-01 7.6445e-01 9.7867e-01 + 1.3101e+00 -5.0250e-02 -1.2029e+00 -5.0110e-01 -1.1139e+00 1.5997e+00 4.1237e-01 5.2761e-01 4.9420e-01 3.8474e-01 + + Columns 11 through 13: + + 6.3604e-01 5.6349e-03 2.1646e-01 + 4.0984e-01 2.8150e-01 6.4308e-01 + 2.3870e-03 5.1378e-01 9.0480e-01 + 6.0314e-01 3.2191e-01 7.3812e-01 + +>> G=A.*D +G = + + 2.4177 3.7405 2.5313 1.6292 -13.9544 -10.9812 + -2.9671 13.2501 -20.0283 -1.6302 18.5191 12.7218 + -4.3758 6.3705 -3.8008 2.3775 31.9569 42.2626 + 9.1708 -0.5527 -18.0438 -9.5209 -25.6204 43.1927 + +>> M=G./4.5 +M = + + 0.5373 0.8312 0.5625 0.3620 -3.1010 -2.4403 + -0.6594 2.9445 -4.4507 -0.3623 4.1154 2.8271 + -0.9724 1.4157 -0.8446 0.5283 7.1015 9.3917 + 2.0380 -0.1228 -4.0097 -2.1157 -5.6934 9.5984 + +>> DDD=D.^3 +DDD = + + 64 512 1728 4096 8000 13824 + 125 729 2197 4913 9261 15625 + 216 1000 2744 5832 10648 17576 + 343 1331 3375 6859 12167 19683 + +>> DL=D>=20 +DL = + + 0 0 0 0 1 1 + 0 0 0 0 1 1 + 0 0 0 0 1 1 + 0 0 0 0 1 1 + +>> Dstolb=D(:) +Dstolb = + + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 +``` +## 8 Изучил некоторые стандартные функции + +```matlab + +>> B1=sqrt(B) +B1 = + + 0.272462 0.882539 0.139574 0.127408 0.797520 0.075066 0.465248 + 0.453605 0.193385 0.692336 0.383809 0.640184 0.530562 0.801920 + 0.858118 0.474180 0.874326 0.989276 0.048857 0.716781 0.951210 + 0.642164 0.726369 0.702991 0.620275 0.776622 0.567372 0.859139 + +>> B2=log(B) +B2 = + + -2.600514 -0.249906 -3.938323 -4.120724 -0.452496 -5.178784 -1.530371 + -1.581058 -3.286145 -0.735369 -1.915222 -0.891998 -1.267637 -0.441493 + -0.306028 -1.492338 -0.268605 -0.021564 -6.037712 -0.665968 -0.100042 + -0.885822 -0.639396 -0.704822 -0.955186 -0.505604 -1.133479 -0.303648 + +>> B3=sin(B) +B3 = + + 7.4167e-02 7.0248e-01 1.9480e-02 1.6232e-02 5.9401e-01 5.6348e-03 2.1477e-01 + 2.0431e-01 3.7389e-02 4.6118e-01 1.4678e-01 3.9846e-01 2.7779e-01 5.9966e-01 + 6.7160e-01 2.2296e-01 6.9214e-01 8.2975e-01 2.3870e-03 4.9147e-01 7.8630e-01 + 4.0079e-01 5.0347e-01 4.7432e-01 3.7532e-01 5.6723e-01 3.1638e-01 6.7290e-01 +>> k=length(B1) +k = 7 +>> nm=size(B1) +nm = + + 4 7 + +>> elem=numel(B1) +elem = 28 +>> NN=linspace(11.5,34.1,20) +NN = + + Columns 1 through 15: + + 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 28.153 + + Columns 16 through 20: + + 29.342 30.532 31.721 32.911 34.100 + +>> FF=ones(2,4) +FF = + + 1 1 1 1 + 1 1 1 1 + +>> GG=zeros(5) +GG = + + 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 + +>> B1D=diag(B1) +B1D = + + 0.2725 + 0.1934 + 0.8743 + 0.6203 + +>> DB=diag(B1D) +DB = + +Diagonal Matrix + + 0.2725 0 0 0 + 0 0.1934 0 0 + 0 0 0.8743 0 + 0 0 0 0.6203 + +>> BS1=sort(B) +BS1 = + + 7.4235e-02 3.7398e-02 1.9481e-02 1.6233e-02 2.3870e-03 5.6349e-03 2.1646e-01 + 2.0576e-01 2.2485e-01 4.7933e-01 1.4731e-01 4.0984e-01 2.8150e-01 6.4308e-01 + 4.1237e-01 5.2761e-01 4.9420e-01 3.8474e-01 6.0314e-01 3.2191e-01 7.3812e-01 + 7.3637e-01 7.7887e-01 7.6445e-01 9.7867e-01 6.3604e-01 5.1378e-01 9.0480e-01 + +>> BS2=sortrows(B,2) +BS2 = + + 2.0576e-01 3.7398e-02 4.7933e-01 1.4731e-01 4.0984e-01 2.8150e-01 6.4308e-01 + 7.3637e-01 2.2485e-01 7.6445e-01 9.7867e-01 2.3870e-03 5.1378e-01 9.0480e-01 + 4.1237e-01 5.2761e-01 4.9420e-01 3.8474e-01 6.0314e-01 3.2191e-01 7.3812e-01 + 7.4235e-02 7.7887e-01 1.9481e-02 1.6233e-02 6.3604e-01 5.6349e-03 2.1646e-01 + +>> DS1=sum(D) +DS1 = + + 22 38 54 70 86 102 + +>> DS2=sum(D,2) +DS2 = + + 84 + 90 + 96 + 102 + +>> DP1=prod(D) +DP1 = + + 840 7920 32760 93024 212520 421200 + +>> dt=det(A*A') +dt = 79.346 +>> dinv=inv(A*A') +dinv = + + 1.711006 -0.207065 0.719828 -0.120793 + -0.207065 0.331898 -0.291950 -0.015622 + 0.719828 -0.291950 0.612827 -0.036756 + -0.120793 -0.015622 -0.036756 0.150286 +``` + +## 9 Поработал с индексацией элементов матриц. + +```matlab + +>> 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 +``` + +## 10 Изучил некоторые управляющие конструкции для использования в программах на m-языке + +```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: + if (D(3,5)>=20) +printf('D(3,5)>=20') +else +printf('D(3,5)<20') +endif +D(3,5)>=20 + +``` + +## 11 Использовал графические функции + +![Скриншот графиков](assets/figure4.png) +![Скриншот гистограммы](assets/figure5.png) +![Скриншот графика "Пирог"](assets/figure6.png) +![Скриншот столбчатой диаграммы](assets/figure7.png) + +## 12 Изучил как работает текстовый редактор среды +![Скриншот файла Prog1.m](assets/figure8.png) + +## 13 Работа с областью переменных +Сохранил область переменных +![Скриншот сохранённого файла Perem](assets/figure9.png) +Далее перезапустил программу и файл загрузился исправно \ No newline at end of file