Hi,
It is not possible to pass an open pipeline (a FILE pointer) directly to a MATLAB variable using MATLAB's built-in data types. However, you can create a custom MATLAB data type that wraps the FILE pointer and pass that custom data type between the two MEX functions.
You can follow the steps mention below to obtain this:
- Create a custom MATLAB data type that wraps the FILE pointer.
- Allocate and return an instance of the custom data type from the 1st Mex function.
- Accept the custom data type as an input to the 2nd Mex function.
- Unwrap the custom data type in the 1st Mex function to obtain the FILE pointer.