Academic Year 2023

Physics entry test – session 3

1. What is the output of this code

A = 3:30;
B = -21:-8;
A = reshape (A, [4,7]);
B = reshape (B, [7,2]);
C = A*B;

disp(size (C) *3);
| A       | B     | C      | D     | E     | F     | G      | H      |
|---------|-------|--------|-------|-------|-------|--------|--------|
| (12,21) | (9,9) | (12,6) | (3,3) | (4,8) | (8,3) | (16,8) | (28,8) |

2. What is the output of this code?

x = linspace (25,11,3);
y = 4: (exp(2) -1);
z = cross (x, y);
disp (max(z));
| A  | B  | C | D  | E  | F   | G | H  |
|----|----|---|----|----|-----|---|----|
| -1 | 54 | 3 | 53 | 46 | 119 | 0 | 16 |

3. What is the output of this code?

4. What is the output of this code?

5. What is the output of this code?

6. What is the output of this code?

Last updated