Academic Year 2022 Sample
Physics entry test β session 2
1. What is the output of this code
A = 1:8;
A = reshape (A, [2,4]);
V = ones (1,4);
R = A. *V;
disp (size (R) );| A | B | C | D | E | F | G | H |
|-------|-------|-------|-------|-------|-------|-------|-------|
| (1,8) | (2,8) | (2,4) | (4,1) | (4,8) | (8,1) | (8,4) | (4,2) |2. What is the output of this code?
x = linspace (3,1,3);
y = 1:pi;
z = cross(x,y);
disp (max(z));| A | B | C | D | E | F | G | H |
|---|---|---|---|---|-----|-----|---|
| 0 | 1 | 5 | 3 | 4 | 2.8 | 3.5 | 9 |3. What is the output of this code?
R(1,:) = [0,0,5];
R(2,:) = [0,4,0];
R(3,:) = [3,0,0];
Q = inv(R) ;
e = round (max (eig (Q)) , 2) ;
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