This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Toolbox Distribution – 2”.
1. What does the function matlab.addons.toolbox.installedToolboxes return?
a) A structure
b) A table
c) A structure of arrays
d) An array of structure
View Answer
Explanation: The above command returns a structure of arrays which are the Name, Version and Guide of the toolboxes installed in the system. It can be converted to array form and then viewed properly.
2. What is the output of the following code?
ver Simulink
a) Shows the version of MATLAB
b) Shows the version of MATLAB and the Simulink Toolbox
c) Shows the version of the Simulink Toolbox
d) Shows the contents of Simulink Toolbox
View Answer
Explanation: The ver function along with the name of a toolbox returns the version of the installed MATLAB version and the version of the toolbox.
3. What is the output of the above code?
ver Simulink Toolbox
a) Error
b) Shows the version of MATLAB
c) Shows the version of MATLAB and the Simulink Toolbox
d) Shows the version of the Simulink Toolbox
View Answer
Explanation: The name of the toolbox is Simulink only. Hence, Toolbox written in the above code is an excess input and the output results in an error. The output would’ve been shows the version of MATLAB and the simulink toolbox if only Simulink was written.
4. A .mltbx toolbox is written in Java.
a) True
b) False
View Answer
Explanation: A .mltbx toolbox is a toolbox which is written in the MATLAB environment only. Hence, the above statement is false.
5. A toolbox is same as a function.
a) True
b) False
View Answer
Explanation: A toolbox has a multitude of function. It itself is not a function. It can be thought of as a header file.
6. What is the output of the following code?
matlab.addons.toolbox.uninstallToolbox[]
a) Error
b) Uninstalls the toolbox given in the input
c) Uninstalls all the toolboxes
d) Uninstalls the function given in the input
View Answer
Explanation: The input to the above command is to be given within parentheses. If the input is given in the syntax shown above, it’ll result in an error.
7. What is the output of the following code?
matlab.addons.Toolbox.uninstalltoolbox()
a) Uninstalls the toolbox given in the input
b) Error
c) Uninstalls all the toolboxes in the system
d) Uninstalls the function given in the input
View Answer
Explanation: There has been an error while spelling the command. It should be matlab.addons.toolbox.uninstallToolbox[], but it’s not so in the above code. Hence, this leads to an error.
8. What are the contents of the toolbox shown by the matlab.addons.toolbox.installedToolboxes command?
a) Name, Guid
b) Name, Version, Guid
c) Name, package, Guid
d) Name, package,
View Answer
Explanation: The given command returns the properties of the installed toolbox, given by option name, version, guid. The guid is the toolbox identifier.
Sanfoundry Global Education & Learning Series – MATLAB.
To practice all areas of MATLAB, here is complete set of 1000+ Multiple Choice Questions and Answers.