diff --git a/ТЕМА1/Perem b/ТЕМА1/Perem new file mode 100644 index 0000000..cc5ca61 --- /dev/null +++ b/ТЕМА1/Perem @@ -0,0 +1,27 @@ +# Created by Octave 8.3.0, Wed Feb 11 12:05:53 2026 GMT +# name: A +# type: matrix +# rows: 4 +# columns: 6 + 0.40954792619079627 0.72637128072136448 0.58995820141105104 -1.474107206178648 0.95041756057764659 -1.6611024723583185 + 0.44652350670142293 0.3470713083436624 -0.066815630612374888 -0.24469222155935305 -0.65133986096740448 -0.58107672353446271 + 0.61766490233295634 -0.81970437246472871 0.53972431614212868 -0.043220832655963042 -0.47749893770959245 0.65836531085335748 + 0.35297396263715014 -0.85235683616018731 1.0795872872180787 0.16663345453838133 -0.54677052601565734 0.22791736535715215 + + +# name: B +# type: matrix +# rows: 4 +# columns: 7 + 0.90759944138250415 0.90951867968101785 0.77342607277472275 0.12175297978845723 0.25085170741207186 0.26115519253221064 0.35871835539447483 + 0.84720438939362386 0.44112178084303855 0.87704105298589174 0.95845160983782018 0.90780444762622037 0.54986030457333723 0.9222404621592335 + 0.7351369640647003 0.1443473134611708 0.34404756962609184 0.39583731596972072 0.92634874427055824 0.32162479176924952 0.9725751803412791 + 0.11402471976563133 0.87559008538440619 0.17580731749099465 0.72856283317301851 0.6990544030919339 0.6558602726949363 0.9313614360410617 + + +# name: C +# type: double_range +# base, limit, increment +4 27 1 + + diff --git a/ТЕМА1/Prog1.m b/ТЕМА1/Prog1.m new file mode 100644 index 0000000..3089023 --- /dev/null +++ b/ТЕМА1/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/images/ch_file.PNG b/ТЕМА1/images/ch_file.PNG new file mode 100644 index 0000000..b000d5b Binary files /dev/null and b/ТЕМА1/images/ch_file.PNG differ diff --git a/ТЕМА1/images/image_bar.png b/ТЕМА1/images/image_bar.png new file mode 100644 index 0000000..9ae757f Binary files /dev/null and b/ТЕМА1/images/image_bar.png differ diff --git a/ТЕМА1/images/image_hist.png b/ТЕМА1/images/image_hist.png new file mode 100644 index 0000000..ef25019 Binary files /dev/null and b/ТЕМА1/images/image_hist.png differ diff --git a/ТЕМА1/images/image_plot.png b/ТЕМА1/images/image_plot.png new file mode 100644 index 0000000..a8e3002 Binary files /dev/null and b/ТЕМА1/images/image_plot.png differ diff --git a/ТЕМА1/images/pie_image.png b/ТЕМА1/images/pie_image.png new file mode 100644 index 0000000..150ebd9 Binary files /dev/null and b/ТЕМА1/images/pie_image.png differ diff --git a/ТЕМА1/images/put_file.PNG b/ТЕМА1/images/put_file.PNG new file mode 100644 index 0000000..31a4499 Binary files /dev/null and b/ТЕМА1/images/put_file.PNG differ diff --git a/ТЕМА1/lab1_otchet.txt b/ТЕМА1/lab1_otchet.txt new file mode 100644 index 0000000..7cbee66 --- /dev/null +++ b/ТЕМА1/lab1_otchet.txt @@ -0,0 +1,472 @@ +# Отчет по теме 1 + +Ершова Вероника, А-03-24 + +## 1 Изучение среды GNU Octave + +## 2 Настройка текущего каталога + +Нажал на окно рядом с *Текущая папка:* и установил путь к папке ТЕМА1: + +![Скриншот выбора текущей папки](ch_file.png) + +## 3 Изучение интерфейса + +## 4 Установка пути к папкам ТЕМА1 и ТЕМА2 +![Скриншот установки](put_file.png) + +## 5 Установка пути к папкам ТЕМА1 и ТЕМА2 + +## 6 Создание матриц и векторов +>> A=randn(4,6) +A = + + -0.3123 0.2623 -0.5659 0.8583 -0.5970 0.9411 + -0.3970 0.8236 0.6951 0.6303 -0.7044 -1.7374 + -1.0984 0.5386 -0.2843 -0.3507 -0.5547 -1.9063 + 0.1025 1.1803 -0.4632 0.4787 0.9092 -0.6363 + +>> B=rand(4,7) +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА2: No such file or directory +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА1: No such file or directory +B = + + 0.644835 0.573813 0.875185 0.901622 0.128847 0.962663 0.245441 + 0.822337 0.515764 0.478145 0.540383 0.080948 0.520514 0.075695 + 0.893529 0.350316 0.940080 0.651110 0.694296 0.249719 0.568012 + 0.404731 0.782888 0.760890 0.166651 0.586766 0.664987 0.086867 + +>> С=4:27 +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА2: No such file or directory +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА1: No such file or directory +error: parse error: + + invalid character '' (ASCII 208) + +>>> С=4:27 + ^ +>> H='This is a symbols vector +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА2: No such file or directory +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА1: No such file or directory +error: parse error: + + syntax error + +>>> H='This is a symbols vector + ^ +>> L=[-2+23.1j, 3-5.6j] +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА2: No such file or directory +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА1: No such file or directory +L = + + -2.0000 + 23.1000i 3.0000 - 5.6000i + +>> warning ('off', 'all') +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА2: No such file or directory +warning: load_path: C:\Users\u202-15\Desktop\it-labs\ТЕМА1: No such file or directory +>> D=reshape(C,[],6) +error: 'C' undefined near line 1, column 11 +>> D=reshape(C,[],6) +error: 'C' undefined near line 1, column 11 +>> D = reshape(C, [], 6) +error: 'C' undefined near line 1, column 13 +>> 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 + +>> 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 = + + -1.467808 1.805345 -0.234815 0.952120 -1.091901 -2.782730 + -0.688507 1.687984 -0.428432 1.069487 -0.188416 -1.522026 + -1.417751 2.027711 -0.782629 1.087059 -0.688963 -2.283294 + -1.194195 1.228917 -0.396936 0.965854 -1.128588 -1.437582 + -0.774871 1.166932 -0.485822 0.198993 0.014438 -1.716256 + -0.713412 1.600553 -0.561983 1.385063 -0.475313 -0.897539 + -0.721710 0.535160 -0.288015 0.100733 -0.435934 -1.038587 + +>> F=[A,B] +F = + + Columns 1 through 12: + + -0.312294 0.262288 -0.565932 0.858280 -0.597024 0.941114 0.644835 0.573813 0.875185 0.901622 0.128847 0.962663 + -0.396963 0.823623 0.695119 0.630284 -0.704447 -1.737432 0.822337 0.515764 0.478145 0.540383 0.080948 0.520514 + -1.098415 0.538569 -0.284317 -0.350730 -0.554662 -1.906275 0.893529 0.350316 0.940080 0.651110 0.694296 0.249719 + 0.102471 1.180265 -0.463169 0.478719 0.909196 -0.636291 0.404731 0.782888 0.760890 0.166651 0.586766 0.664987 + + Column 13: + + 0.245441 + 0.075695 + 0.568012 + 0.086867 + +>> G=A.*D +G = + + -1.2492 2.0983 -6.7912 13.7325 -11.9405 22.5867 + -1.9848 7.4126 9.0365 10.7148 -14.7934 -43.4358 + -6.5905 5.3857 -3.9804 -6.3131 -12.2026 -49.5632 + 0.7173 12.9829 -6.9475 9.0957 20.9115 -17.1799 + +>> M=G./4.5 +M = + + -0.2776 0.4663 -1.5092 3.0517 -2.6534 5.0193 + -0.4411 1.6472 2.0081 2.3811 -3.2874 -9.6524 + -1.4646 1.1968 -0.8845 -1.4029 -2.7117 -11.0140 + 0.1594 2.8851 -1.5439 2.0213 4.6470 -3.8177 + +>> 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 + +>> B1=sqrt(B) +B1 = + + 0.8030 0.7575 0.9355 0.9495 0.3590 0.9812 0.4954 + 0.9068 0.7182 0.6915 0.7351 0.2845 0.7215 0.2751 + 0.9453 0.5919 0.9696 0.8069 0.8332 0.4997 0.7537 + 0.6362 0.8848 0.8723 0.4082 0.7660 0.8155 0.2947 + +>> B2=log(B) +B2 = + + -0.438761 -0.555453 -0.133320 -0.103559 -2.049133 -0.038052 -1.404697 + -0.195605 -0.662106 -0.737842 -0.615477 -2.513947 -0.652939 -2.581039 + -0.112577 -1.048919 -0.061790 -0.429077 -0.364857 -1.387420 -0.565612 + -0.904533 -0.244765 -0.273267 -1.791851 -0.533128 -0.407988 -2.443381 + +>> B3=sin(B) +B3 = + + 0.601067 0.542838 0.767662 0.784334 0.128490 0.820716 0.242985 + 0.732738 0.493200 0.460133 0.514464 0.080860 0.497326 0.075623 + 0.779288 0.343195 0.807605 0.606069 0.639845 0.247131 0.537958 + 0.393772 0.705330 0.689566 0.165881 0.553671 0.617049 0.086757 + +>> B1=sqrt(B) +B1 = + + 0.8030 0.7575 0.9355 0.9495 0.3590 0.9812 0.4954 + 0.9068 0.7182 0.6915 0.7351 0.2845 0.7215 0.2751 + 0.9453 0.5919 0.9696 0.8069 0.8332 0.4997 0.7537 + 0.6362 0.8848 0.8723 0.4082 0.7660 0.8155 0.2947 + +>> B2=log(B) +B2 = + + -0.438761 -0.555453 -0.133320 -0.103559 -2.049133 -0.038052 -1.404697 + -0.195605 -0.662106 -0.737842 -0.615477 -2.513947 -0.652939 -2.581039 + -0.112577 -1.048919 -0.061790 -0.429077 -0.364857 -1.387420 -0.565612 + -0.904533 -0.244765 -0.273267 -1.791851 -0.533128 -0.407988 -2.443381 + +>> B3=sin(B) +B3 = + + 0.601067 0.542838 0.767662 0.784334 0.128490 0.820716 0.242985 + 0.732738 0.493200 0.460133 0.514464 0.080860 0.497326 0.075623 + 0.779288 0.343195 0.807605 0.606069 0.639845 0.247131 0.537958 + 0.393772 0.705330 0.689566 0.165881 0.553671 0.617049 0.086757 + +>> 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.8030 + 0.7182 + 0.9696 + 0.4082 + +>> DB=diag(B1D) +DB = + +Diagonal Matrix + + 0.8030 0 0 0 + 0 0.7182 0 0 + 0 0 0.9696 0 + 0 0 0 0.4082 + +>> BS1=sort(B) +BS1 = + + 0.404731 0.350316 0.478145 0.166651 0.080948 0.249719 0.075695 + 0.644835 0.515764 0.760890 0.540383 0.128847 0.520514 0.086867 + 0.822337 0.573813 0.875185 0.651110 0.586766 0.664987 0.245441 + 0.893529 0.782888 0.940080 0.901622 0.694296 0.962663 0.568012 + +>> BS2=sortrows(B,2) +BS2 = + + 0.893529 0.350316 0.940080 0.651110 0.694296 0.249719 0.568012 + 0.822337 0.515764 0.478145 0.540383 0.080948 0.520514 0.075695 + 0.644835 0.573813 0.875185 0.901622 0.128847 0.962663 0.245441 + 0.404731 0.782888 0.760890 0.166651 0.586766 0.664987 0.086867 + +>> 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 = 73.956 +>> dinv=inv(A*A') +dinv = + + 4.4666e-01 -1.9520e-02 1.0379e-01 -3.8572e-03 + -1.9520e-02 4.8342e-01 -3.4279e-01 -8.4195e-02 + 1.0379e-01 -3.4279e-01 4.5435e-01 -1.6761e-02 + -3.8572e-03 -8.4195e-02 -1.6761e-02 3.6871e-01 + +>> 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 + +>> 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>> plot(D(1,:),B([2,4],1:6)) +>> plot(D(1,:),B([2,4],1:6)) +>> hist(A(:),6) +>> pie(A(:),6) +error: pie: mismatch in number of elements in explode and data +error: called from + __pie__ at line 58 column 9 + pie at line 80 column 10 +>> bar(A(:),6) +>> hist(A(:), 6) +>> plot(D(1,:), B([2,4],1:6)) +>> +>> hist(A(:),6) +>> hist(A, 6) +>> graphics_toolkit('gnuplot') +>> plot(D(1,:),B([2,4],1:6)) +>> hist(A(:),6) +>> pie(D(1,:),B([2,4],1:6)) +error: pie: mismatch in number of elements in explode and data +error: called from + __pie__ at line 58 column 9 + pie at line 80 column 10 +>> +>> plot(D(1,:),B([2,4],1:6)) +>> +>> pie(A) +error: pie: X must be a vector +error: called from + __pie__ at line 38 column 5 + pie at line 80 column 10 + + + + + +>> Prog1 + +D1 = 22 +D2 = + + 18 22 26 + +D3 = + + 13 17 21 + 14 18 22 + +D4 = + + 19 20 21 22 23 + +D5 = + + 6 14 26 + 7 15 27 + +>> Prog1 +D1 = 22 +D2 = + + 18 22 26 + +D3 = + + 13 17 21 + 14 18 22 + +D4 = + + 19 20 21 22 23 + +D5 = + + 6 14 26 + 7 15 27 + +>> + +>> pie(C) + +