diary-2008-03-13 roots([1 5 6]) ans = -3.0000 -2.0000 roots([1 4 4]) ans = -2 -2 roots([1 2 5]) ans = -1.0000 + 2.0000i -1.0000 - 2.0000i 200*200 ans = 40000 sqrt(20000) ans = 141.4214 a=eye(200); whos a Name Size Bytes Class Attributes a 200x200 320000 double ans = diary-2008-03-13 c1 =4 + i*3 c1 = 4.0000 + 3.0000i c1 = 4 + 3i c1 = 4.0000 + 3.0000i clear i=2 i = 2 4+i*3 ans = 10 4+3i ans = 4.0000 + 3.0000i Ex14_1 Enter the coefficient a: 1 Enter the coefficient b: 5 Enter the coefficient c: 6 The roots of this equation are: x1 = (-2.000000) +i (0.000000) x2 = (-3.000000) +i (0.000000) Ex14_1 Enter the coefficient a: 1 Enter the coefficient b: 4 Enter the coefficient c: 4 The roots of this equation are: x1 = (-2.000000) +i (0.000000) x2 = (-2.000000) +i (0.000000) Ex14_1 Enter the coefficient a: 1 Enter the coefficient b: 2 Enter the coefficient c: 5 The roots of this equation are: x1 = (-1.000000) +i (2.000000) x2 = (-1.000000) +i (-2.000000) clear lect14_1 Warning: Imaginary parts of complex X and/or Y arguments ignored > In lect14_1 at 8 lect14_2 result = String 1String 2 result = Long string 1 String 2 ans = 0 ans = 1 ans = 1 End of script lect14_2. s = 'a' s = a double(s) ans = 97 double('b') ans = 98 double('A') ans = 65 double('B') ans = 66 lect14_3 result = 0 1 0 1 a = Columns 1 through 4 1 1 1 1 Columns 5 through 8 0 0 0 1 a = Columns 1 through 4 0 0 0 0 Columns 5 through 8 1 0 0 0 a = Columns 1 through 4 0 0 0 0 Columns 5 through 8 0 1 1 0 a = Columns 1 through 4 0 1 1 1 Columns 5 through 8 0 0 0 1 pos = 3 6 result = 1 3 End of script lect14_3. lect14_4 result = This is a pest! token = This remainder = is a test! result = THIS IS A TEST 1! result = this is a test 2! test = This is a test. ans = 23 trim1 = This is a test. ans = 20 trim2 = This is a test. lect14_5 y = 5317 Name Size Bytes Class Attributes x 1x1 8 double y 1x4 8 char p = 3.1416 p = 3.141593 p = 3.14159e+00 s = The value of pi = 3.141593. b = 6.2832 Name Size Bytes Class Attributes a 1x12 24 char b 1x1 8 double b = 3.1416 v1 = 3.1416 v2 = 3 lect14_6 a = Columns 1 through 4 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 5 through 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 Columns 9 through 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 a_sparse = (1,1) 1 (2,2) 1 (3,3) 1 (4,4) 1 (5,5) 1 (6,6) 1 (7,7) 1 (8,8) 1 (9,9) 1 (10,10) 1 Name Size Bytes Class Attributes a 10x10 800 double a_sparse 10x10 164 double sparse lect14_6 a = Columns 1 through 9 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 Column 10 0 0 0 0 0 0 0 0 0 1 a_sparse = (1,1) 1 (2,2) 1 (3,3) 1 (4,4) 1 (5,5) 1 (6,6) 1 (7,7) 1 (8,8) 1 (9,9) 1 (10,10) 1 Name Size Bytes Class Attributes a 10x10 800 double a_sparse 10x10 164 double sparse lect14_7 a = [3x3 double] [1x22 char] [2x2 double] [] a{1,1} = 1 3 -7 2 0 6 0 5 1 a{2,1} = Column 1 3.0000 + 4.0000i 0 -10.0000i Column 2 -5.0000 3.0000 - 4.0000i a{1,2} = This is a text string. a{2,2} = [] a = Column 1 [3x3 double] [2x2 double] Column 2 [1x22 char] [] a = Column 1 [3x3 double] Column 2 [1x22 char] c = Column 1 [2x2 double] 'cats' Column 2 'dogs' [0 + 1.0000i] ans = 1 2 3 4 ans = cats ans = 2 cellstring = Column 1 'Alan M. Usas' Column 2 'Male' Column 3 'SSN 999-99-9999' data = Line 1 Additional Line c = 'Line 1' 'Additional Line' newdata = Line 1 Additional Line Ex14_2 Text: c Text: b Text: a Text: ans = Columns 1 through 2 'a' 'b' Column 3 'c' lect14_9 student = name: [1x8 char] address: [1x15 char] city: [1x7 char] state: 'LA' zip: [1x5 char] student = 1x2 struct array with fields: name address city state zip ans = name: [1x8 char] address: [1x15 char] city: [1x7 char] state: 'LA' zip: [1x5 char] ans = name: [1x11 char] address: [1x16 char] city: [1x8 char] state: 'NY' zip: [1x5 char] student = 1x1000 struct array with fields: name address city state zip student = 1x1000 struct array with fields: name address city state zip exams student2 = 1x1000 struct array with fields: name address city state exams