If you have a flac binary, and also the popenw mex extension, this routine allows you to write flac (free lossless audio coder)-format files as a drop-in replacement for wavwrite, accepting all the same syntax.
You can get popenw at http://www.mathworks.com/matlabcentral/fileexchange/13851
You can get the flac binary at
Inspired by: Fast FLAC reader
Create scripts with code, output, and formatted text in a single executable document.