Academic Year 2022 Actual

Physics entry test – session 2

1. What is the output of this code

A = 1:15;
A = reshape (A, [15,3]);
V = ones (1,3);
R = A. *V; 
disp (size (R) );
| A      | B     | C     | D     | E     | F     | G     | H      |
|--------|-------|-------|-------|-------|-------|-------|--------|
| (1,15) | (3,1) | (1,5) | (5,3) | (1,3) | (1,5) | (3,5) | (15,1) |

2. What is the output of this code?

x = linspace (7,1,3);
y = 1:(exp(1) + 1);
z = cross(x,y);
disp (max(z));
| A  | B | C | D | E | F | G   | H  |
|----|---|---|---|---|---|-----|----|
| 10 | 7 | 8 | 0 | 9 | 4 | 3.5 | 11 |

3. What is the output of this code?

R(1,:) = [0,0,2];
R(2,:) = [0,1,0];
R(3,:) = [4,0,0];
Q = inv(R) ;
e = max (eig (Q));
disp (e);

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