User Tools

Site Tools


info:linux

This is an old revision of the document!


Useful Tips for Linux

This page summarizes some tips for beginners as well as solutions I face during daily work.

Basic commands

Development

Matlab Tips

Function skeleton

To arrive at your own custom skeleton for new .m files, you may insert your skeleton before line 121 of edit.m. Notice that matlab will load edit.m on startup and changes to edit.m thereafter won't be seen until rebooting matlab. Example:

% ...
else
        file_1 = fopen(fileName, 'w'); % line 121 here
        fprintf(file_1, '%% #######################\n');
        fprintf(file_1, '%% # %s\n', fileName);
        fprintf(file_1, '%% # Author(s): L.Doblies\n');
        fprintf(file_1, '%% # %s\n', date);
        fprintf(file_1, '%% #######################\n\n');
        fprintf(file_1, 'function ret = %s()\n\n', fileNameWithoutExtension);
        fprintf(file_1, 'end');
        fclose(file_1); 
        openEditor(fullfile(path,fileName)); % this was @line 121 before
end
% ... 
info/linux.1259872285.txt.gz · Last modified: 2009/12/03 21:31 by moritz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki