pi ans = 3.1416 system_dependent('setprintcolorchoice', -1) ; ; ; ; ; ; disp(get(0, 'Echo')) off set(0, 'Echo', 'off') set(0, 'Format', 'long') set(0, 'FormatSpacing', 'loose') feature('EightyColumns', 0); system_dependent('TabCompletion', 100); pi ans = 3.14159265358979 format short pi ans = 3.1416 format short format long pi ans = 3.14159265358979 x=9 x = 9 x x = 9 xa=1 xa = 1 xa xa = 1 ax ??? Undefined function or variable 'ax'. X ??? Undefined function or variable 'X'. X=89 X = 89 X X = 89 x x = 9 who Your variables are: X ans x xa ans ans = 3.14159265358979 D=x D = 9 D D = 9 x x = 9 clear X X ??? Undefined function or variable 'X'. who Your variables are: D ans x xa clear D who Your variables are: ans x xa clear c c ??? Undefined function or variable 'c'. c= ??? c= | Error: Expected a variable, function, or constant, found "end of line". who Your variables are: ans x xa XS=48 XS = 48 xs=48 xs = 48 clear XS who Your variables are: ans x xa xs clear x* who Your variables are: ans i ans = 0 + 1.00000000000000i j ans = 0 + 1.00000000000000i i ans = 0 + 1.00000000000000i 3*i+4*j ans = 0 + 7.00000000000000i X=8 X = 8 3*X+4*j ans = 24.00000000000000 + 4.00000000000000i 3X+4j ??? 3X+4j | Error: Missing operator, comma, or semicolon. 3i+4j ans = 0 + 7.00000000000000i i=3 i = 3 j=-5 j = -5 3*i+4*j ans = -11 3i+4j ans = 0 + 7.00000000000000i clear i j i ans = 0 + 1.00000000000000i j ans = 0 + 1.00000000000000i log 10 ans = 3.89182029811063 3.87120101090789 log(10) ans = 2.30258509299405 log10(10) ans = 1 lig(7) ??? Undefined function or variable 'lig'. log 7 ans = 4.00733318523247 log7 ??? Undefined function or variable 'log7'. log 7 ans = 4.00733318523247 log(7) ans = 1.94591014905531 log 55 ans = 3.97029191355212 3.97029191355212 log 56 ans = 3.97029191355212 3.98898404656427 log=log(7) log = 1.94591014905531 log(1) ans = 1.94591014905531 log(7) ??? Index exceeds matrix dimensions. log (7) ??? Index exceeds matrix dimensions. log (2) ??? Index exceeds matrix dimensions. log(1) ans = 1.94591014905531 log(2) ??? Index exceeds matrix dimensions. clear log who Your variables are: X ans clear X A=[1 2 3 4;5 6 7 8;9 10 11 12; 13 14 15 16] A = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 A*A ans = 90 100 110 120 202 228 254 280 314 356 398 440 426 484 542 600 A=[1 2 3 4;5 6 7 8;9 10 11 12] A = 1 2 3 4 5 6 7 8 9 10 11 12 A*A ??? Error using ==> * Inner matrix dimensions must agree. A*A' ans = 30 70 110 70 174 278 110 278 446 A.*A' ??? Error using ==> .* Matrix dimensions must agree. A.*A ans = 1 4 9 16 25 36 49 64 81 100 121 144 1/A ??? Error using ==> / Matrix dimensions must agree. 1./A ans = Columns 1 through 3 1.00000000000000 0.50000000000000 0.33333333333333 0.20000000000000 0.16666666666667 0.14285714285714 0.11111111111111 0.10000000000000 0.09090909090909 Column 4 0.25000000000000 0.12500000000000 0.08333333333333 B=rand(7,7) B = Columns 1 through 3 0.95012928514718 0.01850364324822 0.17626614449462 0.23113851357429 0.82140716429525 0.40570621306210 0.60684258354179 0.44470336435319 0.93546969910761 0.48598246870930 0.61543234810009 0.91690443991341 0.89129896614890 0.79193703742704 0.41027020699095 0.76209683302739 0.92181297074480 0.89364953091353 0.45646766516834 0.73820724581067 0.05789130478427 Columns 4 through 6 0.35286813221700 0.27218792496996 0.41864946772751 0.81316649730376 0.19881426776106 0.84622141782432 0.00986130066092 0.01527392702904 0.52515249630517 0.13889088195695 0.74678567656443 0.20264735765039 0.20276521856027 0.44509643228795 0.67213746847429 0.19872174266149 0.93181457846166 0.83811844505239 0.60379247919382 0.46599434167542 0.01963951386482 Column 7 0.68127716128214 0.37948101802800 0.83179601760961 0.50281288399625 0.70947139270339 0.42889236534100 0.30461736686939 B.^3 ans = Columns 1 through 3 0.85772508717489 0.00000633536644 0.00547654569421 0.01234857796708 0.55421140567666 0.06677824111007 0.22347458831054 0.08794501862229 0.81863286204205 0.11477883398589 0.23309929453769 0.77085417184355 0.70806024057726 0.49667461495279 0.06905735520980 0.44261942598497 0.78330057301585 0.71367699085083 0.09511084857187 0.40228599266394 0.00019401710235 Columns 4 through 6 0.04393769967506 0.02016538714726 0.07337559401926 0.53769801328610 0.00785855404080 0.60597127727713 0.00000095896466 0.00000356329792 0.14482925701270 0.00267929915469 0.41647404271157 0.00832190657358 0.00833643523150 0.08817842542677 0.30365072179060 0.00784758739587 0.80907447932837 0.58873003925325 0.22012182129335 0.10119100982736 0.00000757516681 Column 7 0.31620700774133 0.05464748392015 0.57550686732849 0.12712155372818 0.35711218221431 0.07889417633810 0.02826597556648 3^B ans = Columns 1 through 2 8.29365099722779 + 0.00000000000000i 5.61736641974980 8.82682104733020 + 0.00000000000000i 10.66487126984868 7.79639350826417 + 0.00000000000000i 7.35313416924416 8.43447946738952 + 0.00000000000000i 8.32193827814713 10.19416540454986 + 0.00000000000000i 9.76961085458330 12.41615461018623 + 0.00000000000000i 12.23770782003549 + 0.00000000000000i 6.20060548700420 + 0.00000000000000i 6.48407342547206 - 0.00000000000000i Columns 3 through 4 4.86459714551569 + 0.00000000000000i 3.81581592138533 - 0.00000000000000i 7.98716108552948 - 0.00000000000000i 5.89324078640287 + 0.00000000000000i 7.88207352976316 - 0.00000000000000i 4.13654364418624 - 0.00000000000000i 7.46292904595055 + 0.00000000000000i 5.66567726859228 - 0.00000000000000i 7.83151312777635 + 0.00000000000000i 5.60593098916181 - 0.00000000000000i 10.49145102579413 - 0.00000000000000i 6.76319848296517 4.75666703163188 - 0.00000000000000i 4.11656224934290 - 0.00000000000000i Columns 5 through 6 4.40589823673836 - 0.00000000000000i 5.15944361056604 + 0.00000000000000i 6.22621471382542 - 0.00000000000000i 8.30074846383351 + 0.00000000000000i 4.64044611642928 - 0.00000000000000i 6.37135358018003 + 0.00000000000000i 5.86332083767974 - 0.00000000000000i 6.74548765627601 + 0.00000000000000i 7.64225911274975 - 0.00000000000000i 8.33974301349601 + 0.00000000000000i 8.62119393488773 - 0.00000000000000i 11.64824780837738 + 0.00000000000000i 4.39402507744691 - 0.00000000000000i 4.77311137886737 + 0.00000000000000i Column 7 6.01812944133791 + 0.00000000000000i 7.96904967621195 + 0.00000000000000i 7.17726162922690 + 0.00000000000000i 7.54337401553256 + 0.00000000000000i 8.73038852264275 + 0.00000000000000i 10.57053360268815 + 0.00000000000000i 6.34814725185513 + 0.00000000000000i format long 3^B ans = Columns 1 through 2 8.29365099722779 + 0.00000000000000i 5.61736641974980 8.82682104733020 + 0.00000000000000i 10.66487126984868 7.79639350826417 + 0.00000000000000i 7.35313416924416 8.43447946738952 + 0.00000000000000i 8.32193827814713 10.19416540454986 + 0.00000000000000i 9.76961085458330 12.41615461018623 + 0.00000000000000i 12.23770782003549 + 0.00000000000000i 6.20060548700420 + 0.00000000000000i 6.48407342547206 - 0.00000000000000i Columns 3 through 4 4.86459714551569 + 0.00000000000000i 3.81581592138533 - 0.00000000000000i 7.98716108552948 - 0.00000000000000i 5.89324078640287 + 0.00000000000000i 7.88207352976316 - 0.00000000000000i 4.13654364418624 - 0.00000000000000i 7.46292904595055 + 0.00000000000000i 5.66567726859228 - 0.00000000000000i 7.83151312777635 + 0.00000000000000i 5.60593098916181 - 0.00000000000000i 10.49145102579413 - 0.00000000000000i 6.76319848296517 4.75666703163188 - 0.00000000000000i 4.11656224934290 - 0.00000000000000i Columns 5 through 6 4.40589823673836 - 0.00000000000000i 5.15944361056604 + 0.00000000000000i 6.22621471382542 - 0.00000000000000i 8.30074846383351 + 0.00000000000000i 4.64044611642928 - 0.00000000000000i 6.37135358018003 + 0.00000000000000i 5.86332083767974 - 0.00000000000000i 6.74548765627601 + 0.00000000000000i 7.64225911274975 - 0.00000000000000i 8.33974301349601 + 0.00000000000000i 8.62119393488773 - 0.00000000000000i 11.64824780837738 + 0.00000000000000i 4.39402507744691 - 0.00000000000000i 4.77311137886737 + 0.00000000000000i Column 7 6.01812944133791 + 0.00000000000000i 7.96904967621195 + 0.00000000000000i 7.17726162922690 + 0.00000000000000i 7.54337401553256 + 0.00000000000000i 8.73038852264275 + 0.00000000000000i 10.57053360268815 + 0.00000000000000i 6.34814725185513 + 0.00000000000000i format short pi ans = 3.1416 y=1:50 y = Columns 1 through 12 1 2 3 4 5 6 7 8 9 10 11 12 Columns 13 through 24 13 14 15 16 17 18 19 20 21 22 23 24 Columns 25 through 36 25 26 27 28 29 30 31 32 33 34 35 36 Columns 37 through 48 37 38 39 40 41 42 43 44 45 46 47 48 Columns 49 through 50 49 50 x=[7 11 15:47] x = Columns 1 through 12 7 11 15 16 17 18 19 20 21 22 23 24 Columns 13 through 24 25 26 27 28 29 30 31 32 33 34 35 36 Columns 25 through 35 37 38 39 40 41 42 43 44 45 46 47 x=7:4:47 x = 7 11 15 19 23 27 31 35 39 43 47 x=7:4:49 x = 7 11 15 19 23 27 31 35 39 43 47 z=x+7 z = 14 18 22 26 30 34 38 42 46 50 54 v=[x z 17] v = Columns 1 through 12 7 11 15 19 23 27 31 35 39 43 47 14 Columns 13 through 23 18 22 26 30 34 38 42 46 50 54 17 v(27) ??? Index exceeds matrix dimensions. v1=[v(24:27) v(1:23)] ??? Index exceeds matrix dimensions. v v = Columns 1 through 12 7 11 15 19 23 27 31 35 39 43 47 14 Columns 13 through 23 18 22 26 30 34 38 42 46 50 54 17 V=[v(24:27) v(1:23)] ??? Index exceeds matrix dimensions. v(27)=27 v = Columns 1 through 12 7 11 15 19 23 27 31 35 39 43 47 14 Columns 13 through 24 18 22 26 30 34 38 42 46 50 54 17 0 Columns 25 through 27 0 0 27 v1=[v(24:27) v(1:23)] v1 = Columns 1 through 12 0 0 0 27 7 11 15 19 23 27 31 35 Columns 13 through 24 39 43 47 14 18 22 26 30 34 38 42 46 Columns 25 through 27 50 54 17 v1(1:4)=[1 1 1 1] v1 = Columns 1 through 12 1 1 1 1 7 11 15 19 23 27 31 35 Columns 13 through 24 39 43 47 14 18 22 26 30 34 38 42 46 Columns 25 through 27 50 54 17 ones(1,4) ans = 1 1 1 1 w(1:2:21)=x w = Columns 1 through 12 7 0 11 0 15 0 19 0 23 0 27 0 Columns 13 through 21 31 0 35 0 39 0 43 0 47 w(2:2:22)=z w = Columns 1 through 12 7 14 11 18 15 22 19 26 23 30 27 34 Columns 13 through 22 31 38 35 42 39 46 43 50 47 54 diary off