MATLAB Questions and Answers – Toolbox Distribution – 2

«
»

This set of Tough MATLAB Questions and Answers 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

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

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

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

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

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

4. A .mltbx toolbox is written in Java.
a) True
b) False
View Answer

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

Answer: b
Explanation: A toolbox has a multitude of function. It itself is not a function. It can be thought of as a header file.
advertisement

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

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

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

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

Answer: b
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 tough questions and answers on all areas of MATLAB, here is complete set of 1000+ Multiple Choice Questions and Answers.

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!

advertisement
advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter