Non conosco matlab, ma con il c++ puoi creare file come vuoi!
Basta che, per un tipo di file, sai come è strutturato...