This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Toolbox Distribution – 1”.
1. What is the extension of a newly created toolbox?
a) .mltbx
b) .mlx
c) .tlx
d) .tbx
View Answer
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?
matlab.addons.toolbox.packageToolbox
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
View Answer
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?
matlab.addons.toolbox.toolboxVersion
a) Shows all versions of a toolbox
b) Shows the current version of a toolbox
c) Shows the previous versions of a toolbox
d) Error
View Answer
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 ______
a) Parentheses
b) {}
c) []
d) The function doesn’t exist
View Answer
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?
matlab.addons.toolbox.installToolbox
a) Install a .mlx file
b) Install a .mtbx file
c) Install a .mltbx file
d) Install a .tbx file
View Answer
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 _______
a) Ignored
b) Shown
c) Do not exist
d) Depends on the system
View Answer
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?
matlab.addons.toolbox.installToolbox(‘Lo.mltbx’)
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
View Answer
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?
matlab.addons.toolbox.installToolbox[‘Lo.mltbx’]
a) Error due to a directory
b) Installs the Lo toolbox into the directory
c) Logical Error
d) Syntactical error
View Answer
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?
matlab.addons.toolbox.installToolbox(Lo.mltbx,True)
a) Error
b) Ignores license file and installs the toolbox directly
c) Prompts the license file and installs the toolbox
d) Logical error
View Answer
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.