Performance and Memory – 2 MCQ’s

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Performance and Memory – 2″.

1. Which of the following contains the memory for the virtual address space given to MATLAB?

[p,q]=memory

a) Error
b) p
c) There’s no virtual space for MATLAB
d) q

2. The timeit function returns the time in ms.
a) True
b) False

3. The function handle given to the timeit command cannot be defined within the timeit function.
a) True
b) False

4. What is the output of the following code?

syms x;
timeit(@sin(x))

a) Syntactical Error
b) Logical Error
c) .0012
d) .0016

5. What is the output of the following code?

syms x;
timeit(@()sin(x))

a) The time required to compute the value of a sin(x)
b) Error due to sin(x)
c) Syntactical Error
d) Time required to initialize sin(x) as a vector of symbolic elements

6. Which of the following method increases the performance of operation?
a) Preallocation
b) Postallocation
c) It’s not possible to increase performance
d) Characterization

7. What is the output of the following code?

a=timeit(()sin(x));

a) Error
b) .0012s
c) 12ms
d) .0016s

8. Is a==c?

>>a=timeit(@()sin(x));
>>b=cputime;
>>sin(x);
>>c=cputime-b;

a) No
b) Yes
c) Almost
d) Error

9. The tick command starts a timer.
a) True
b) False

10. The amount of memory saved for swap files is more than the physical memory allotted for MATLAB.
a) True
b) False

Simran

Share
Published by
Simran

Recent Posts

Abacus Dream Meaning – Top 5 Dreams About Abacus

Have you ever had a dream about an abacus? In a dream, seeing an abacus…

2 months ago

Abalone Dream Meaning

Have you ever had a dream about abalone? It denotes a period of change in…

2 months ago

Abandonment Dream Meaning

Have you ever had a dream about being abandoned? It's time to let go of…

2 months ago

Advice Dream Meaning – Top 5 Dreams About Advice

Did you have any dreams about giving advice? They have to do with action plans…

2 months ago

Avalanche Dream Meaning – Top 8 Dreams About Avalanche

Have you ever had a dream involving an avalanche? In your dream, an avalanche represents…

2 months ago

Acrobat Dream Meaning – Top 8 Dreams About Acrobat

Have you ever fantasised about acrobats or about becoming one? It indicates that you need…

2 months ago