Calling External Functions

MATLAB

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Calling External Functions”.

1. What is the function of the mexext command?
a) Reveals the version of the MEX file
b) Reveals the package in which the MEX file is stored
c) Returns the extension of the MEX file for the system
d) Error

2. What is the output of the following code?

Mexext(‘all’)

a) Error
b) Returns a structure of arrays of MEX extensions
c) Returns an array of structures of MEX extensions
d) Returns the system version of MEX file

3. What is the output of the following code snippet?

computer

a) Shows the system version
b) Shows the MATLAB version
c) Shows the previous MATLAB versions in the current system
d) Error

4. What is the output of the following code?

loadlibrary()

a) Load a C library
b) Load a C function
c) Load a C header file
d) Load a C file

5. The callib command implements the function from a _________
a) library loaded by the loadlibrary() command
b) .h file loaded by the loadlibrary() command
c) c-file loaded by the loadlibrary() command
d) function loaded by the loadlibrary() command

6. What is the working of the following command?

libfunctions()

a) Returns the pre-loaded libraries
b) Returns the libraries in a pre-loaded library
c) Returns the header-files in a pre-loaded C library
d) Returns the functions in a pre-loaded library

7. What is the working of the following command?

libfunctions(libname,'-full')

a) Returns the functions of a shared library
b) Returns the functions of a shared library and it’s signatures
c) Returns the signatures of the functions of a shared library
d) Error

8. What is the working of the following command?

libfunctionsview

a) Displays the signatures of the function in an image window
b) Displays the signature of the functions in a graphical window
c) Displays the signature of the functions in the workspace window
d) Displays the signature of the function in a separate window

9. The libfunctionsview command shows the signature of the functions present in the ___________
a) pre-loaded library
b) any library
c) Java library
d) Not present

10. What is the working of the following command?

libisloaded()

a) Checks the version of the loaded library
b) Checks whether a library is working in the system
c) Checks whether a library is loaded in the system
d) Checks whether a library is present in the system

11. Which of the following command unloads a library from the system?
a) unldlibrary()
b) unloadlibrary()
c) unloadlibrary{}
d) unldlibrary[]

12. The isjava command returns?
a) 1 if the input is a java file
b) 1 if the input is not a java object
c) 1 if the input is a java object
d) 0 if the input is a java object

13. The input to the isjava command is given within _________
a) ()
b) []
c) {}
d) Doesn’t exist

14. The isobject(A) returns a 1 if the _________
a) A is a MATLAB class
b) A is a JAVA class
c) A is a C file
d) A is not a MATLAB class

15. Python files cannot be used in MATLAB.
a) True
b) False

16. Python commands can be run in MATLAB without Python in the system.
a) True
b) False

Leave a Reply

Your email address will not be published. Required fields are marked *