Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Zadanie 1
- >> cos(pi/3)+cot(asin(0.5))+(atan(0.3))^2
- ans =
- 2.3170
- Zadanie 2
- >> x=32*pi
- x =
- 100.5310
- >> y=(cosh(x))^2 - (sinh(x))^2
- y =
- 0
- Zadanie 3
- >> A = (rand(4,5))*10
- A =
- Columns 1 through 4
- 8.1472 6.3236 9.5751 9.5717
- 9.0579 0.9754 9.6489 4.8538
- 1.2699 2.7850 1.5761 8.0028
- 9.1338 5.4688 9.7059 1.4189
- Column 5
- 4.2176
- 9.1574
- 7.9221
- 9.5949
- >> min(A)
- ans =
- 1.2699 0.9754 1.5761 1.4189 4.2176
- >> max(A)
- ans =
- 9.1338 6.3236 9.7059 9.5717 9.5949
- Zadanie 5
- >> x = [1 5 2 8 9 0 1] , y = [5 2 2 6 0 0 2]
- x =
- 1 5 2 8 9 0 1
- y =
- 5 2 2 6 0 0 2
- a) >> x > y
- ans =
- 0 1 0 1 1 0 0
- >> x < y
- ans =
- 1 0 0 0 0 0 1
- b) >> x == y
- ans =
- 0 0 1 0 0 1 0
- >> x <= y
- ans =
- 1 0 1 0 0 1 1
- c) >> x >= y
- ans =
- 0 1 1 1 1 1 0
- >> x | y
- ans =
- 1 1 1 1 1 0 1
- d) >> x & y
- ans =
- 1 1 1 1 0 0 1
- >> y & x
- ans =
- 1 1 1 1 0 0 1
- e) >> (x > y) | (y < x)
- ans =
- 0 1 0 1 1 0 0
- >> (x > y) & (y < x)
- ans =
- 0 1 0 1 1 0 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement