image thumbnail
from mexme - write MEX files in no time by Patrick Mineault
writes fully valid MEX .cpp files including mexFunction boilerplate based on numeric C/C++ snippet

writefile(location,str)
function [] = writefile(location,str)
    %writefile(location,str)
    %Writes a string to a file
    h = fopen(location,'w');
    fwrite(h,str);
    fclose(h);
end

Contact us