0% found this document useful (0 votes)
26 views8 pages

A1 (Matlab)

The document defines several matrices (A, B, C, D, E, F) and performs some basic linear algebra operations on them like transposes and inverses. It defines random 6x6, 10x10, and 10x10 matrices, combines two of them into a complex matrix using i, and takes the transpose and inverse of various matrices.

Uploaded by

shites khalko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views8 pages

A1 (Matlab)

The document defines several matrices (A, B, C, D, E, F) and performs some basic linear algebra operations on them like transposes and inverses. It defines random 6x6, 10x10, and 10x10 matrices, combines two of them into a complex matrix using i, and takes the transpose and inverse of various matrices.

Uploaded by

shites khalko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

1)

A=rand(6,6)
A'
B=rand(10,10)
C=rand(10,10)
D=B+i*C
D'
E=inv(A)
F=inv(D)

OUTPUT:

>> A1

A=

0.4942 0.6987 0.9047 0.1829 0.9787 0.0424

0.7791 0.1978 0.6099 0.2399 0.7127 0.0714

0.7150 0.0305 0.6177 0.8865 0.5005 0.5216

0.9037 0.7441 0.8594 0.0287 0.4711 0.0967

0.8909 0.5000 0.8055 0.4899 0.0596 0.8181

0.3342 0.4799 0.5767 0.1679 0.6820 0.8175

ans =

0.4942 0.7791 0.7150 0.9037 0.8909 0.3342

0.6987 0.1978 0.0305 0.7441 0.5000 0.4799

0.9047 0.6099 0.6177 0.8594 0.8055 0.5767

0.1829 0.2399 0.8865 0.0287 0.4899 0.1679

0.9787 0.7127 0.5005 0.4711 0.0596 0.6820

0.0424 0.0714 0.5216 0.0967 0.8181 0.8175

B=
0.7224 0.0835 0.6569 0.4897 0.4177 0.9991 0.1564 0.3846 0.5841 0.1615

0.1499 0.1332 0.6280 0.3395 0.9831 0.1711 0.8555 0.5830 0.1078 0.1788

0.6596 0.1734 0.2920 0.9516 0.3015 0.0326 0.6448 0.2518 0.9063 0.4229

0.5186 0.3909 0.4317 0.9203 0.7011 0.5612 0.3763 0.2904 0.8797 0.0942

0.9730 0.8314 0.0155 0.0527 0.6663 0.8819 0.1909 0.6171 0.8178 0.5985

0.6490 0.8034 0.9841 0.7379 0.5391 0.6692 0.4283 0.2653 0.2607 0.4709

0.8003 0.0605 0.1672 0.2691 0.6981 0.1904 0.4820 0.8244 0.5944 0.6959

0.4538 0.3993 0.1062 0.4228 0.6665 0.3689 0.1206 0.9827 0.0225 0.6999

0.4324 0.5269 0.3724 0.5479 0.1781 0.4607 0.5895 0.7302 0.4253 0.6385

0.8253 0.4168 0.1981 0.9427 0.1280 0.9816 0.2262 0.3439 0.3127 0.0336

C=

0.0688 0.1056 0.4574 0.6951 0.6022 0.4714 0.2428 0.4257 0.6073 0.2564

0.3196 0.6110 0.8754 0.0680 0.3868 0.0358 0.9174 0.6444 0.4501 0.6135

0.5309 0.7788 0.5181 0.2548 0.9160 0.1759 0.2691 0.6476 0.4587 0.5822

0.6544 0.4235 0.9436 0.2240 0.0012 0.7218 0.7655 0.6790 0.6619 0.5407

0.4076 0.0908 0.6377 0.6678 0.4624 0.4735 0.1887 0.6358 0.7703 0.8699

0.8200 0.2665 0.9577 0.8444 0.4243 0.1527 0.2875 0.9452 0.3502 0.2648

0.7184 0.1537 0.2407 0.3445 0.4609 0.3411 0.0911 0.2089 0.6620 0.3181

0.9686 0.2810 0.6761 0.7805 0.7702 0.6074 0.5762 0.7093 0.4162 0.1192

0.5313 0.4401 0.2891 0.6753 0.3225 0.1917 0.6834 0.2362 0.8419 0.9398

0.3251 0.5271 0.6718 0.0067 0.7847 0.7384 0.5466 0.1194 0.8329 0.6456

D=

Columns 1 through 5

0.7224 + 0.0688i 0.0835 + 0.1056i 0.6569 + 0.4574i 0.4897 + 0.6951i 0.4177 + 0.6022i
0.1499 + 0.3196i 0.1332 + 0.6110i 0.6280 + 0.8754i 0.3395 + 0.0680i 0.9831 + 0.3868i

0.6596 + 0.5309i 0.1734 + 0.7788i 0.2920 + 0.5181i 0.9516 + 0.2548i 0.3015 + 0.9160i

0.5186 + 0.6544i 0.3909 + 0.4235i 0.4317 + 0.9436i 0.9203 + 0.2240i 0.7011 + 0.0012i

0.9730 + 0.4076i 0.8314 + 0.0908i 0.0155 + 0.6377i 0.0527 + 0.6678i 0.6663 + 0.4624i

0.6490 + 0.8200i 0.8034 + 0.2665i 0.9841 + 0.9577i 0.7379 + 0.8444i 0.5391 + 0.4243i

0.8003 + 0.7184i 0.0605 + 0.1537i 0.1672 + 0.2407i 0.2691 + 0.3445i 0.6981 + 0.4609i

0.4538 + 0.9686i 0.3993 + 0.2810i 0.1062 + 0.6761i 0.4228 + 0.7805i 0.6665 + 0.7702i

0.4324 + 0.5313i 0.5269 + 0.4401i 0.3724 + 0.2891i 0.5479 + 0.6753i 0.1781 + 0.3225i

0.8253 + 0.3251i 0.4168 + 0.5271i 0.1981 + 0.6718i 0.9427 + 0.0067i 0.1280 + 0.7847i

Columns 6 through 10

0.9991 + 0.4714i 0.1564 + 0.2428i 0.3846 + 0.4257i 0.5841 + 0.6073i 0.1615 + 0.2564i

0.1711 + 0.0358i 0.8555 + 0.9174i 0.5830 + 0.6444i 0.1078 + 0.4501i 0.1788 + 0.6135i

0.0326 + 0.1759i 0.6448 + 0.2691i 0.2518 + 0.6476i 0.9063 + 0.4587i 0.4229 + 0.5822i

0.5612 + 0.7218i 0.3763 + 0.7655i 0.2904 + 0.6790i 0.8797 + 0.6619i 0.0942 + 0.5407i

0.8819 + 0.4735i 0.1909 + 0.1887i 0.6171 + 0.6358i 0.8178 + 0.7703i 0.5985 + 0.8699i

0.6692 + 0.1527i 0.4283 + 0.2875i 0.2653 + 0.9452i 0.2607 + 0.3502i 0.4709 + 0.2648i

0.1904 + 0.3411i 0.4820 + 0.0911i 0.8244 + 0.2089i 0.5944 + 0.6620i 0.6959 + 0.3181i

0.3689 + 0.6074i 0.1206 + 0.5762i 0.9827 + 0.7093i 0.0225 + 0.4162i 0.6999 + 0.1192i

0.4607 + 0.1917i 0.5895 + 0.6834i 0.7302 + 0.2362i 0.4253 + 0.8419i 0.6385 + 0.9398i

0.9816 + 0.7384i 0.2262 + 0.5466i 0.3439 + 0.1194i 0.3127 + 0.8329i 0.0336 + 0.6456i

ans =

Columns 1 through 5

0.7224 - 0.0688i 0.1499 - 0.3196i 0.6596 - 0.5309i 0.5186 - 0.6544i 0.9730 - 0.4076i

0.0835 - 0.1056i 0.1332 - 0.6110i 0.1734 - 0.7788i 0.3909 - 0.4235i 0.8314 - 0.0908i

0.6569 - 0.4574i 0.6280 - 0.8754i 0.2920 - 0.5181i 0.4317 - 0.9436i 0.0155 - 0.6377i
0.4897 - 0.6951i 0.3395 - 0.0680i 0.9516 - 0.2548i 0.9203 - 0.2240i 0.0527 - 0.6678i

0.4177 - 0.6022i 0.9831 - 0.3868i 0.3015 - 0.9160i 0.7011 - 0.0012i 0.6663 - 0.4624i

0.9991 - 0.4714i 0.1711 - 0.0358i 0.0326 - 0.1759i 0.5612 - 0.7218i 0.8819 - 0.4735i

0.1564 - 0.2428i 0.8555 - 0.9174i 0.6448 - 0.2691i 0.3763 - 0.7655i 0.1909 - 0.1887i

0.3846 - 0.4257i 0.5830 - 0.6444i 0.2518 - 0.6476i 0.2904 - 0.6790i 0.6171 - 0.6358i

0.5841 - 0.6073i 0.1078 - 0.4501i 0.9063 - 0.4587i 0.8797 - 0.6619i 0.8178 - 0.7703i

0.1615 - 0.2564i 0.1788 - 0.6135i 0.4229 - 0.5822i 0.0942 - 0.5407i 0.5985 - 0.8699i

Columns 6 through 10

0.6490 - 0.8200i 0.8003 - 0.7184i 0.4538 - 0.9686i 0.4324 - 0.5313i 0.8253 - 0.3251i

0.8034 - 0.2665i 0.0605 - 0.1537i 0.3993 - 0.2810i 0.5269 - 0.4401i 0.4168 - 0.5271i

0.9841 - 0.9577i 0.1672 - 0.2407i 0.1062 - 0.6761i 0.3724 - 0.2891i 0.1981 - 0.6718i

0.7379 - 0.8444i 0.2691 - 0.3445i 0.4228 - 0.7805i 0.5479 - 0.6753i 0.9427 - 0.0067i

0.5391 - 0.4243i 0.6981 - 0.4609i 0.6665 - 0.7702i 0.1781 - 0.3225i 0.1280 - 0.7847i

0.6692 - 0.1527i 0.1904 - 0.3411i 0.3689 - 0.6074i 0.4607 - 0.1917i 0.9816 - 0.7384i

0.4283 - 0.2875i 0.4820 - 0.0911i 0.1206 - 0.5762i 0.5895 - 0.6834i 0.2262 - 0.5466i

0.2653 - 0.9452i 0.8244 - 0.2089i 0.9827 - 0.7093i 0.7302 - 0.2362i 0.3439 - 0.1194i

0.2607 - 0.3502i 0.5944 - 0.6620i 0.0225 - 0.4162i 0.4253 - 0.8419i 0.3127 - 0.8329i

0.4709 - 0.2648i 0.6959 - 0.3181i 0.6999 - 0.1192i 0.6385 - 0.9398i 0.0336 - 0.6456i

E=

-3.0140 -0.6075 1.8599 3.9122 -2.5543 1.1161

-3.2487 -6.2737 4.8665 8.1833 -5.8588 2.5066

6.6267 6.3496 -6.9427 -10.9827 9.0816 -4.2577

-1.2467 -3.8293 3.9223 3.7542 -3.1388 0.5936

-1.0108 -0.3926 1.2977 1.6685 -2.3661 1.4292

-0.4364 0.5660 -0.6075 -0.8183 0.6953 0.9850


F=

Columns 1 through 5

-0.2961 + 0.2225i 0.4551 + 1.0292i -0.5757 + 0.0159i -0.3369 - 0.3421i 0.1616 + 0.6097i

-0.0637 + 0.4587i -0.7779 - 0.0639i 0.8516 - 0.5827i 0.0930 + 0.1912i 0.2740 + 0.1955i

0.5900 + 0.6807i -0.8911 + 0.1226i 0.3425 - 0.9458i 0.1837 + 0.1020i -1.2490 - 0.2856i

-0.3073 - 0.6686i 0.4139 - 0.0447i -0.4463 + 0.1202i 0.0439 + 0.2715i 0.1131 - 0.2316i

0.2395 - 0.7278i 0.4635 + 0.6675i -1.0306 - 0.7900i 0.0530 + 0.3443i -0.0533 + 0.3683i

0.1284 - 0.7854i 0.3674 - 0.2739i -0.7795 + 0.8186i -0.0808 - 0.3490i 0.3019 + 0.3049i

0.4596 - 0.3627i 1.2979 + 0.0765i -0.4126 + 0.3813i -0.3237 - 0.4778i 0.7482 + 0.6168i

-0.1790 + 0.2993i -0.5696 - 1.1191i 1.4946 + 0.2477i -0.1361 - 0.0615i 0.3764 - 0.8691i

0.5038 + 0.4760i -1.3463 - 0.1751i 1.5531 - 0.4203i 0.6771 - 0.0837i -0.1858 - 0.2853i

-0.5946 + 0.0667i 0.7864 - 0.1221i -1.2681 + 0.8638i -0.0647 + 0.1879i -0.3826 + 0.0096i

Columns 6 through 10

0.6924 - 0.5329i 0.8918 - 1.1605i -0.8714 + 0.3050i 0.4297 - 0.3993i -0.1032 + 0.4164i

-0.2158 + 0.1981i -1.4314 + 0.6157i 0.6031 - 1.1137i 0.7171 + 0.3599i -0.6676 - 0.5004i

0.3392 + 0.2187i 0.5016 + 0.4605i -0.4027 - 0.4954i 1.0059 + 1.0957i -0.4427 - 0.7372i

0.3697 - 0.2547i 0.2313 + 0.0481i -0.4620 + 0.5672i -0.3898 - 0.6854i 0.7614 + 0.7870i

0.5752 + 0.2057i 1.2036 + 0.0788i -1.0798 + 0.0805i 0.2593 - 0.5731i -0.2462 + 0.5406i

0.0851 + 0.0760i -0.0091 - 0.3704i 0.4003 + 0.6120i -0.7933 - 0.5104i 0.6974 + 0.1261i

-0.1317 + 0.1106i -0.4633 + 0.1571i -0.3542 - 0.0049i -0.3457 - 1.6526i -0.2794 + 1.0952i

-1.1363 + 0.1456i -1.1844 + 0.8963i 1.5357 - 0.9143i -0.7077 + 1.3903i 0.1216 - 0.4416i

-0.8774 + 0.5794i -0.7403 + 0.9212i 0.6282 - 1.2618i 0.3745 + 0.9917i -1.0786 - 0.8369i

0.4713 - 0.7419i 0.8427 - 1.7329i 0.1249 + 2.1453i -0.0795 - 0.8067i 0.9952 - 0.2375i

>>
2)
A=[1 2 4;3 4 5;6 7 8]

B=A*A
C=2*A
D=A+i*B
E=D*D
F=2*E
G=A-D

OUTPUT:

A=

1 2 4

3 4 5

6 7 8

B=

31 38 46

45 57 72

75 96 123

C=

2 4 8

6 8 10

12 14 16

D=

1.0e+02 *
0.0100 + 0.3100i 0.0200 + 0.3800i 0.0400 + 0.4600i

0.0300 + 0.4500i 0.0400 + 0.5700i 0.0500 + 0.7200i

0.0600 + 0.7500i 0.0700 + 0.9600i 0.0800 + 1.2300i

E=

1.0e+04 *

-0.6090 + 0.0842i -0.7722 + 0.1072i -0.9774 + 0.1364i

-0.9315 + 0.1296i -1.1814 + 0.1644i -1.4958 + 0.2082i

-1.5795 + 0.2202i -2.0034 + 0.2790i -2.5368 + 0.3528i

F=

1.0e+04 *

-1.2180 + 0.1684i -1.5444 + 0.2144i -1.9548 + 0.2728i

-1.8630 + 0.2592i -2.3628 + 0.3288i -2.9916 + 0.4164i

-3.1590 + 0.4404i -4.0068 + 0.5580i -5.0736 + 0.7056i

G=

1.0e+02 *

0.0000 - 0.3100i 0.0000 - 0.3800i 0.0000 - 0.4600i

0.0000 - 0.4500i 0.0000 - 0.5700i 0.0000 - 0.7200i

0.0000 - 0.7500i 0.0000 - 0.9600i 0.0000 - 1.2300i


3.

1)
x=-4*pi:0.1:4*pi

y=sin(x)

plot(x,y,'.')
hold on
y=sin(x-7)
plot(x,y,'*')
hold on
y=sin(abs(x)-7)
plot(x,y)
hold on
y=sin((abs(x)).^7-3)
plot(x,y)
hold on
y=sin((abs(x.^7))-3)
plot(x,y)

2)
x=-2*pi:0.01:2*pi

y=sin(tanh(asin(abs(x.^8))))
plot(x,y,'*')

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy