% komentar 1+2 % priklad ans = 3 a=5 a = 5 A=5*(90+7) A = 485 b=3*(4+7/(9-5)) b = 17.2500 M=[1,2,4;5,6,8] M = 1 2 4 5 6 8 who Your variables are: A M a ans b whos Name Size Bytes Class Attributes A 1x1 8 double M 2x3 48 double a 1x1 8 double ans 1x1 8 double b 1x1 8 double 1/0 ans = Inf 0/0 ans = NaN pi ans = 3.1416 sin(pi/2) ans = 1 sin(pi) ans = 1.2246e-016 eps ans = 2.2204e-016 realmin ans = 2.2251e-308 realmax ans = 1.7977e+308 sqrt(-1) ans = 0 + 1.0000i i ans = 0 + 1.0000i j ans = 0 + 1.0000i x=realmin*2 x = 4.4501e-308 c=5i+7j+6+20 c = 26.0000 +12.0000i 5/Inf ans = 0 whos Name Size Bytes Class Attributes A 1x1 8 double M 2x3 48 double a 1x1 8 double ans 1x1 8 double b 1x1 8 double c 1x1 16 double complex x 1x1 8 double h=a+f {??? Undefined function or variable 'f'. } h=a+3 h = 8 R1=5 R1 = 5 R2=3 R2 = 3 R3=2 R3 = 2 R=R1+R2+R3 R = 10 Odpory=[5,3,2] Odpory = 5 3 2 sum(Odpory) ans = 10 S=[6;8;7;9] S = 6 8 7 9 M M = 1 2 4 5 6 8 Odpory Odpory = 5 3 2 B=[M;Odpory] B = 1 2 4 5 6 8 5 3 2 t=[90,-5,i] t = Columns 1 through 2 90.0000 -5.0000 Column 3 0 + 1.0000i C=[B;t] C = 1.0000 2.0000 4.0000 5.0000 6.0000 8.0000 5.0000 3.0000 2.0000 90.0000 -5.0000 0 + 1.0000i S S = 6 8 7 9 D=[C,S] D = 1.0000 2.0000 4.0000 6.0000 5.0000 6.0000 8.0000 8.0000 5.0000 3.0000 2.0000 7.0000 90.0000 -5.0000 0 + 1.0000i 9.0000 E=[1 2 3 4; 5 6 7 8] E = 1 2 3 4 5 6 7 8 whos Name Size Bytes Class Attributes A 1x1 8 double B 3x3 72 double C 4x3 192 double complex D 4x4 256 double complex E 2x4 64 double M 2x3 48 double Odpory 1x3 24 double R 1x1 8 double R1 1x1 8 double R2 1x1 8 double R3 1x1 8 double S 4x1 32 double a 1x1 8 double ans 1x1 8 double b 1x1 8 double c 1x1 16 double complex h 1x1 8 double t 1x3 48 double complex x 1x1 8 double D D = 1.0000 2.0000 4.0000 6.0000 5.0000 6.0000 8.0000 8.0000 5.0000 3.0000 2.0000 7.0000 90.0000 -5.0000 0 + 1.0000i 9.0000 E E = 1 2 3 4 5 6 7 8 F=[E;D] F = 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 1.0000 2.0000 4.0000 6.0000 5.0000 6.0000 8.0000 8.0000 5.0000 3.0000 2.0000 7.0000 90.0000 -5.0000 0 + 1.0000i 9.0000 size(F) ans = 6 4 size(E) ans = 2 4 size(D) ans = 4 4 v=size(F) v = 6 4 whos Name Size Bytes Class Attributes A 1x1 8 double B 3x3 72 double C 4x3 192 double complex D 4x4 256 double complex E 2x4 64 double F 6x4 384 double complex M 2x3 48 double Odpory 1x3 24 double R 1x1 8 double R1 1x1 8 double R2 1x1 8 double R3 1x1 8 double S 4x1 32 double a 1x1 8 double ans 1x2 16 double b 1x1 8 double c 1x1 16 double complex h 1x1 8 double t 1x3 48 double complex v 1x2 16 double x 1x1 8 double v=size(F) v = 6 4 [r,s]=size(F) r = 6 s = 4 [rE,sE]=size(E) rE = 2 sE = 4 E E = 1 2 3 4 5 6 7 8 E(2,3) ans = 7 E(1,4) ans = 4 F F = Columns 1 through 2 1.0000 2.0000 5.0000 6.0000 1.0000 2.0000 5.0000 6.0000 5.0000 3.0000 90.0000 -5.0000 Columns 3 through 4 3.0000 4.0000 7.0000 8.0000 4.0000 6.0000 8.0000 8.0000 2.0000 7.0000 0 + 1.0000i 9.0000 F F = 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 1.0000 2.0000 4.0000 6.0000 5.0000 6.0000 8.0000 8.0000 5.0000 3.0000 2.0000 7.0000 90.0000 -5.0000 0 + 1.0000i 9.0000 F(6,2) ans = -5 F(6,2)=18 F = 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 1.0000 2.0000 4.0000 6.0000 5.0000 6.0000 8.0000 8.0000 5.0000 3.0000 2.0000 7.0000 90.0000 18.0000 0 + 1.0000i 9.0000 E E = 1 2 3 4 5 6 7 8 H=[1:4,5:8] H = 1 2 3 4 5 6 7 8 H=[1:4;5:8] H = 1 2 3 4 5 6 7 8 1:10 ans = 1 2 3 4 5 6 7 8 9 10 1:2:10 ans = 1 3 5 7 9 1:3:10 ans = 1 4 7 10 50:4:70 ans = 50 54 58 62 66 70 10:1 ans = Empty matrix: 1-by-0 10:-1:1 ans = 10 9 8 7 6 5 4 3 2 1 10:-0.5:7 ans = 10.0000 9.5000 9.0000 8.5000 8.0000 7.5000 7.0000 diary off