MATLAB Questions and Answers – Toolbox Distribution – 1

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

Answer: a
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

Answer: a
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.
advertisement
advertisement

3. What does the following function do?

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!
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

Answer: b
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.
advertisement

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

Answer: a
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?

advertisement
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

Answer: c
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

Answer: b
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

Answer: d
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

Answer: d
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

Answer: a
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.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.