Main Content

libisloaded

Determine if shared C library is loaded

Description

example

tf = libisloaded (libname)returns logical1(true) if the shared C librarylibnameis loaded. Otherwise, it returns logical0(false).

Examples

collapse all

Add theshrlibexamples folder to the path.

addpath(fullfile(matlabroot,'extern','examples','shrlib'))

Load the library, if it is not already loaded.

if~libisloaded('shrlibsample') loadlibrary('shrlibsample')end

When finished, unload the library to free memory.

unloadlibraryshrlibsample

Input Arguments

collapse all

Name of shared library, specified as a character vector. Do not include the path or file extension inlibname.

If you callloadlibraryusing thealiasoption, then you must use the alias name for thelibnameargument.

Data Types:char

Version History

Introduced before R2006a