This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Toolbox Distribution – 1”.
1. What is the extension of a newly created toolbox?
Explanation: A MATLAB Toolbox has the extension .mltbx. This is created when we produce a toolbox which is defined by the user.
2. What does the following function do?
a) Converts a .prj file to a .mltbx file
b) Converts a .mat file to a .mltbx file
c) Converts a .mltbx file to a .prj file
d) Converts a .mltbx file to a .prj file
Explanation: The above function is defined in MATLAB to convert a user-defined toolbox into a installation file which can be used by other people to use your toolbox. The extension of this installation file is .mltbx.
3. What does the following function do?
a) Shows all versions of a toolbox
b) Shows the current version of a toolbox
c) Shows the previous versions of a toolbox
Explanation: The above function is used to get the version of the toolbox which will be given as an input to the above function. It doesn’t show the previously installed versions or the versions which are possibly present.
4. The input to the function “matlab.addons.toolbox.toolboxVersion” is given within ______
d) The function doesn’t exist
Explanation: The input to this function is given within parentheses. This is pre-defined in MATLAB and hence, only option Parentheses is correct.
5. What does this function do?
a) Install a .mlx file
b) Install a .mtbx file
c) Install a .mltbx file
d) Install a .tbx file
Explanation: The above function installs a toolbox into a system. Since a toolbox is a .mltbx file, only option Install a .mltbx file is correct.
6. License arguments for installing toolboxes are _______
c) Do not exist
d) Depends on the system
Explanation: Irrespective of the system, a toolbox has a license agreement within it- it will be prompted during installation.
7. What is the output of the following code?
a) Installs the Lo class into the directory
b) Uninstalls the Lo class from the directory
c) Uninstalls the Lo toolbox from the directory, if already present
d) Installs the Lo toolbox into the directory
Explanation: The above function installs a toolbox into the system. The toolbox should be present in the current directory.
8. What is the output of the following code?
a) Error due to a directory
b) Installs the Lo toolbox into the directory
c) Logical Error
d) Syntactical error
Explanation: The input to the matlab.addons.toolbox.installToolbox command should be within parentheses. Here,  is used which results in a syntactical error. It would’ve been a secondary error which won’t be checked even if it happens since the syntactical error will return the control.
9. What is the output of the following code?
b) Ignores license file and installs the toolbox directly
c) Prompts the license file and installs the toolbox
d) Logical error
Explanation: The name of the toolbox file, given as an input to the command, is not given within ‘’. Hence, it’s not recognized as a file name and MATLAB returns an error.
Sanfoundry Global Education & Learning Series – MATLAB.
To practice all areas of MATLAB, here is complete set of 1000+ Multiple Choice Questions and Answers.