3.41e6 ans = 3410000 exp(1) ans = 2.7183 format long ans ans = 2.718281828459046 format short ans ans = 2.7183 exp(1); 3+4i ans = 3.0000 + 4.0000i i ans = 0 + 1.0000i j ans = 0 + 1.0000i 2+3*4^2 ans = 50 pi ans = 3.1416 cos(pi/2) ans = 6.1232e-017 cos(pi) ans = -1 'det här är en textsträng' ans = det här är en textsträng ans ans = det här är en textsträng A1=[4 5 6 7] A1 = 4 5 6 7 S_a='text' S_a = text S_a S_a = text 1/0 ans = Inf 0/0 ans = NaN who Your variables are: A1 S_a ans whos Name Size Bytes Class Attributes A1 1x4 32 double S_a 1x4 8 char ans 1x1 8 double A1 A1 = 4 5 6 7 A1=5 A1 = 5 clear A1 clear all who 3=x ??? 3=x | Error: The expression to the left of the equals sign is not a valid target for an assignment. x=4 x = 4 x=4:7 x = 4 5 6 7 x=4:0.1:7 x = Columns 1 through 9 4.0000 4.1000 4.2000 4.3000 4.4000 4.5000 4.6000 4.7000 4.8000 Columns 10 through 18 4.9000 5.0000 5.1000 5.2000 5.3000 5.4000 5.5000 5.6000 5.7000 Columns 19 through 27 5.8000 5.9000 6.0000 6.1000 6.2000 6.3000 6.4000 6.5000 6.6000 Columns 28 through 31 6.7000 6.8000 6.9000 7.0000 x' ans = 4.0000 4.1000 4.2000 4.3000 4.4000 4.5000 4.6000 4.7000 4.8000 4.9000 5.0000 5.1000 5.2000 5.3000 5.4000 5.5000 5.6000 5.7000 5.8000 5.9000 6.0000 6.1000 6.2000 6.3000 6.4000 6.5000 6.6000 6.7000 6.8000 6.9000 7.0000 x x = Columns 1 through 9 4.0000 4.1000 4.2000 4.3000 4.4000 4.5000 4.6000 4.7000 4.8000 Columns 10 through 18 4.9000 5.0000 5.1000 5.2000 5.3000 5.4000 5.5000 5.6000 5.7000 Columns 19 through 27 5.8000 5.9000 6.0000 6.1000 6.2000 6.3000 6.4000 6.5000 6.6000 Columns 28 through 31 6.7000 6.8000 6.9000 7.0000 sin(x) ans = Columns 1 through 9 -0.7568 -0.8183 -0.8716 -0.9162 -0.9516 -0.9775 -0.9937 -0.9999 -0.9962 Columns 10 through 18 -0.9825 -0.9589 -0.9258 -0.8835 -0.8323 -0.7728 -0.7055 -0.6313 -0.5507 Columns 19 through 27 -0.4646 -0.3739 -0.2794 -0.1822 -0.0831 0.0168 0.1165 0.2151 0.3115 Columns 28 through 31 0.4048 0.4941 0.5784 0.6570 x(1) ans = 4 x(2) ans = 4.1000 x(2)=1000 x = 1.0e+003 * Columns 1 through 9 0.0040 1.0000 0.0042 0.0043 0.0044 0.0045 0.0046 0.0047 0.0048 Columns 10 through 18 0.0049 0.0050 0.0051 0.0052 0.0053 0.0054 0.0055 0.0056 0.0057 Columns 19 through 27 0.0058 0.0059 0.0060 0.0061 0.0062 0.0063 0.0064 0.0065 0.0066 Columns 28 through 31 0.0067 0.0068 0.0069 0.0070 x=[1 3 5 8 9] x = 1 3 5 8 9 y=[7 4 5 3 3] y = 7 4 5 3 3 plot(x,y) plot(x,y, 'r.' ) plot(x,y, 'r.b--' ) ??? Error using ==> plot Error in color/linetype argument plot(x,y, 'r.--' ) edit uppgift1 A = 1 B = 10 x = Columns 1 through 9 1.0000 1.0909 1.1818 1.2727 1.3636 1.4545 1.5455 1.6364 1.7273 Columns 10 through 18 1.8182 1.9091 2.0000 2.0909 2.1818 2.2727 2.3636 2.4545 2.5455 Columns 19 through 27 2.6364 2.7273 2.8182 2.9091 3.0000 3.0909 3.1818 3.2727 3.3636 Columns 28 through 36 3.4545 3.5455 3.6364 3.7273 3.8182 3.9091 4.0000 4.0909 4.1818 Columns 37 through 45 4.2727 4.3636 4.4545 4.5455 4.6364 4.7273 4.8182 4.9091 5.0000 Columns 46 through 54 5.0909 5.1818 5.2727 5.3636 5.4545 5.5455 5.6364 5.7273 5.8182 Columns 55 through 63 5.9091 6.0000 6.0909 6.1818 6.2727 6.3636 6.4545 6.5455 6.6364 Columns 64 through 72 6.7273 6.8182 6.9091 7.0000 7.0909 7.1818 7.2727 7.3636 7.4545 Columns 73 through 81 7.5455 7.6364 7.7273 7.8182 7.9091 8.0000 8.0909 8.1818 8.2727 Columns 82 through 90 8.3636 8.4545 8.5455 8.6364 8.7273 8.8182 8.9091 9.0000 9.0909 Columns 91 through 99 9.1818 9.2727 9.3636 9.4545 9.5455 9.6364 9.7273 9.8182 9.9091 Column 100 10.0000 y = Columns 1 through 9 0.8415 0.8870 0.9253 0.9559 0.9786 0.9933 0.9997 0.9979 0.9878 Columns 10 through 18 0.9696 0.9433 0.9093 0.8678 0.8191 0.7636 0.7018 0.6343 0.5615 Columns 19 through 27 0.4840 0.4026 0.3178 0.2304 0.1411 0.0507 -0.0402 -0.1308 -0.2202 Columns 28 through 36 -0.3079 -0.3930 -0.4748 -0.5528 -0.6261 -0.6943 -0.7568 -0.8130 -0.8625 Columns 37 through 45 -0.9049 -0.9398 -0.9669 -0.9861 -0.9971 -0.9999 -0.9944 -0.9807 -0.9589 Columns 46 through 54 -0.9292 -0.8918 -0.8471 -0.7953 -0.7370 -0.6726 -0.6027 -0.5277 -0.4484 Columns 55 through 63 -0.3654 -0.2794 -0.1911 -0.1012 -0.0105 0.0804 0.1705 0.2593 0.3459 Columns 64 through 72 0.4296 0.5098 0.5858 0.6570 0.7227 0.7825 0.8358 0.8822 0.9213 Columns 73 through 81 0.9528 0.9764 0.9920 0.9994 0.9985 0.9894 0.9721 0.9467 0.9136 Columns 82 through 90 0.8729 0.8250 0.7703 0.7092 0.6423 0.5701 0.4931 0.4121 0.3277 Columns 91 through 99 0.2406 0.1515 0.0611 -0.0298 -0.1204 -0.2100 -0.2979 -0.3833 -0.4656 Column 100 -0.5440 uppgift1 uppgift1 uppgift1 uppgift2 ??? Undefined function or variable 'uppgift2'. fallstracka m = 15 g = 8.8100 ??? Undefined function or variable 't'. Error in ==> fallstracka at 4 s=.5*m*g*t^2 fallstracka m = 15 g = 8.8100 t = 20 s = 26430 fallstracka ??? Error using ==> mpower Matrix must be square. Error in ==> fallstracka at 5 s=.5*m*g*t^2 fallstracka s = 1.0e+004 * 0.0066 0.6607 2.6430 edit