System Commands

MATLAB

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “System Commands”.

1. The clipboard function cannot work without
a) Python
b) C
c) JAVA
d) Not present in MATLAB

2. What is the output of the following code?

clipboard('copy',poe)

a) Logical Error
b) Copies ‘poe’
c) Copies poe
d) Syntactical Error

3. What is the output of the following code?

clipboard(copy,’poe’)

a) Error
b) Copies poe
c) Copies poe to the MATLAB file
d) Copies poe to the MATLAB function

4. What is the output of the following code?

clipboard[‘copy’,poe]

a) Error
b) Copies poe to a mlx file
c) Copies poe to a mat file
d) Copies poe to a mltbx file

5. What is the output of the following code?

clipboard(‘copy’,’poe’)
clipboard(‘paste’)

a) Prints poe
b) Prints ‘poe’
c) Prints error
d) Function not present in MATLAB

6. What is the output of the following code?

system(cmd)

a) Starts Command Prompt
b) Starts Command Prompt in MATLAB
c) Starts Command Prompt in a separate window
d) Error

7. What is the output of the above code?

system(‘cmd’)

a) Error
b) Starts Command Prompt in MATLAB
c) Starts Command Prompt in a separate window
d) Error

8. What is the output of the following code?

system('cd')

a) Shows the current directory
b) Shows the directory where MATLAB is located
c) Error
d) The function doesn’t exist

9. What is the output of the following code?

system['cd']

a) Error
b) Syntactical error
c) Logical Error
d) Opens command prompt

10. What is the output of the following code?

system('date')

a) Shows the date in your system
b) Shows the actual date
c) Shows the date when MATLAB was installed
d) Error

11. Which of the following command can be used for DOS commands?
a) msdos
b) dos
c) ds
d) not possible in MATLAB

12. The input to the unix command should be within _________
a) ()
b) {}
c) []
d) Is not available in MATLAB

13. If the command, given as an input to the system command, gets executed, MATLAB returns a _________
a) 0
b) 1
c) True
d) False

14. What is the output of the following code?

system(date)

a) It shows the date but MATLAB returns 1
b) It doesn’t show the date and MATLAB returns 0
c) It doesn’t show the date but MATLAB returns 1
d) It shows the date but MATLAB returns 0

15. The input to the system command is not necessarily given within ‘’.
a) True
b) False

16. All system commands take input within parentheses.
a) True
b) False

17. Windows Registry can be accessed by ___________
a) winqueryreg
b) winreg
c) windowsregistry
d) not possible

18. How can we check the history of commands used?
a) By only clicking the up direction button
b) Using the commandhist command
c) Using the commandhistory command
d) Using the cmdhstry command

Leave a Reply

Your email address will not be published. Required fields are marked *