image thumbnail

mexme - write MEX files in no time

by

 

30 Apr 2011 (Updated )

writes fully valid MEX .cpp files including mexFunction boilerplate based on numeric C/C++ snippet

readfile(location)
function [str] = readfile(location)
    %[str] = readfile(location)
    %Read the contents of a file as a string
    h = fopen(location,'r');
    str = fread(h,Inf,'char=>char')';
    fclose(h);
end

Contact us