Hi hendro,
In C++ you can do this by including the nimotion.lib and FlexMS32.lib when compiling and including the neccessary *.h files at the beginning of the program. (For example, at the top of the program, you'd type #include "Flexmotn.h" if you were using the function flex_load_rpm).
In Visual Basic you would include the line Private Declare Sub nimotion Lib "Location of dll" if you wanted to include a dll.
You would likely need a similar command in MatLab. Unfortunately, since this is a forum for National Instruments products, I do not know what that is.