Company: Mathworks mcq
Difficulty: medium
To resolve name conflicts, in what order does MATLAB evaluate the following locations which have the same name? (1) Nested function within current function, (2) Imported package function, (3) Functions in current folder, (4) Private functions. 1, 2, 3, 4 1, 4, 3, 2 2, 1, 4, 3 4, 3, 2, 1 Consider the file A.m whose contents are as shown below: function x = A x = 0; function B x = 1; y = 1; end function C x = 2; y = 2; end end function y = D(y) y = y*y; end The number of distinct variables named 'x' and 'y' (case-insensitive 'X' and 'Y' in MATLAB context often refers to the specific instances in these scopes) are: x: 1, y: 1 x: 2, y: 2 x: 3, y: 3 x: 4, y: 4 Let's say you developed a function in MATLAB which is numerically accurate but takes a long time to finish execution. Which of the following can be used to identify the statements within the function that lead to the high execution time? (Select all that apply) 'tic' and 'toc' statements 'start' and 'stop' statements 'timer' functiona