Example of loading C DLL and performance comparison
No License
This example shows how to load a C DLL into Matlab and make a call to functions it contains. In addition, a C-like M file implementation of the same functionality is included for comparison. Furthermore, a vectorized M file has been added to try to match the performance of the library call.
Files:-
conv.c and conv.h : use these to create the dll called conv.dll
myconvm1 : C-like M file that performs the same thing as myconv in conv.dll
myconvm2 : vectorized M file with performance approaching that of myconv in conv.dll
myscr : script that shows how to load the library and that times the execution times of the different versions
Cite As
Vinesh Bhunjun (2024). Example of loading C DLL and performance comparison (https://www.mathworks.com/matlabcentral/fileexchange/15065-example-of-loading-c-dll-and-performance-comparison), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > External Language Interfaces > C++ with MATLAB > Call C++ from MATLAB > Build MATLAB Interface to C++ Library >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |