From ee2d85efb7d3cf16a6f8921e250c490e963308cc Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Tue, 10 Sep 2019 14:05:31 -0500 Subject: Do the lab --- math2373/lab1.txt | 167 ++++++++++++++++-------------------------------------- 1 file changed, 49 insertions(+), 118 deletions(-) (limited to 'math2373') diff --git a/math2373/lab1.txt b/math2373/lab1.txt index 2790af2..75b2264 100644 --- a/math2373/lab1.txt +++ b/math2373/lab1.txt @@ -1,212 +1,170 @@ 27+48 -ans = 75 27-48 -ans = -21 27*48 -ans = 1296 sqrt(16) -ans = 4 27/48 -ans = 0.5625 16.5*(38.5+71/40) -ans = 664.5375 2^5 -ans = 32 5*3^2 -ans = 45 (5*3)^2 -ans = 225 5*(3^2) -ans = 45 x=7 -x = 7 y=9 -y = 9 x+y -ans = - 16 -xy -{Undefined function or variable 'xy'. -} + 16 + x*y -ans = + 63 x/y -ans = + 0.7778 x^2 -ans = + 49 x=25 -x = 25 y=40 -y = 40 x+y -ans = + 65 x*y -ans = + 1000 x/y -ans = + 0.6250 (8*x)/5 -ans = 40 6*x+9*y -ans = 510 4+5 -ans = - 9 ans+10 -ans = 19 ans+100 -ans = 119 x=1, y=3, 3*x+7*y, 9*y, (5*y)/(2*x+y) -x = 1 -y = - 3 -ans = - 24 -ans = - 27 -ans = - 3 who -Your variables are: - ans x y dog=3 -dog = - - 3 - DOG=7 -DOG = - - 7 who -Your variables are: - DOG ans dog x y clear dog + who Your variables are: @@ -214,88 +172,90 @@ Your variables are: DOG ans x y clear + who + pi -ans = + 3.1416 5+pi -ans = + 8.1416 5*pi -ans = + 15.7080 sqrt(25) -ans = + 5 sqrt(24) -ans = + 4.8990 sqrt(-9) -ans = + 0.0000 + 3.0000i exp(1) -ans = + 2.7183 exp(5) -ans = + 148.4132 sinh(3) -ans = + 10.0179 cosh(5) -ans = + 74.2099 sinh(sqrt(5)) -ans = + 4.6248 tan(sqrt(5)) -ans = + -1.2746 cos(pi) -ans = + -1 sin(pi/3) -ans = + 0.8660 @@ -312,35 +272,28 @@ y = x+y, x*y -ans = + 0.4253 -ans = + -0.3502 -log(8),log(100(,asin(.5)+log(5) - log(8),log(100(,asin(.5)+log(5) - ↑ -{Error: Invalid expression. When calling a -function or indexing a variable, use parentheses. -Otherwise, check for mismatched delimiters. -} log(8),log(100),asin(.5)+log(5) -ans = + 2.0794 -ans = + 4.6052 -ans = + 2.1330 @@ -355,75 +308,67 @@ z = 3.0000 + 4.0000i -4z+w,z/w - 4z+w,z/w - ↑ -{Error: Invalid expression. Check for missing -multiplication operator, missing or unbalanced -delimiters, or other syntax error. To construct -matrices, use brackets instead of parentheses. -} 4*z+w,z/w -ans = + 17.0000 + 8.0000i -ans = + -0.1910 + 0.4944i pi -ans = + 3.1416 format long pi -ans = + 3.141592653589793 format short pi -ans = + 3.1416 6/14 -ans = + 0.4286 format rational 6/14 -ans = + 3/7 format short 2^20 -ans = + 1048576 2^20; [4 3 7 8 10 13] -ans = + 4 3 7 8 10 13 [4; 3; 7; 8; 10; 13] -ans = + 4 3 @@ -434,14 +379,14 @@ ans = [4 3 7; 8 10 13] -ans = + 4 3 7 8 10 13 [4 3; 7 8; 10 13] -ans = + 4 3 7 8 @@ -460,31 +405,17 @@ y = x+y,3*x -ans = + 1 16 16 -ans = + 9 36 21 clear -a=(3,5,7,9) - a=(3,5,7,9) - ↑ -{Error: Invalid expression. When calling a -function or indexing a variable, use parentheses. -Otherwise, check for mismatched delimiters. -} -a=(3 5 7 9) - a=(3 5 7 9) - ↑ -{Error: Invalid expression. Check for missing -multiplication operator, missing or unbalanced -delimiters, or other syntax error. To construct -matrices, use brackets instead of parentheses. -} + a=[3 5 7 9] a = @@ -499,13 +430,13 @@ b = a-5*b -ans = + -37 15 -13 -46 dot(a,b) -ans = + 141 @@ -522,13 +453,13 @@ y = x.*y -ans = + 28 15 22 54 x.^2 -ans = + 16 9 4 81 -- cgit v1.2.3