Skip to content

Instantly share code, notes, and snippets.

@darthsuogles
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save darthsuogles/6e2b1ab19484a4804e0e to your computer and use it in GitHub Desktop.

Select an option

Save darthsuogles/6e2b1ab19484a4804e0e to your computer and use it in GitHub Desktop.
% Some useful tips
% Ref: http://emacsclub.github.io/html/matlab.html
% There are some other http://emacsclub.github.io/html/index.html
% http://ubcmatlabguide.github.io/html/gettingStarted.html
% Check if a parameter called 'arg1' of a function exists
if ~exist('arg1','var') || isempty(arg1)
disp(arg1)
end
% Working with the Torque PBS system
% http://www.arc.ox.ac.uk/content/running-matlab#submissionScripts
matlab -nodisplay -nosplash < script.m > run.log
% Inside script.m
[~, compute_node_name] = system('hostname');
compute_node_name = strtrim(compute_node_name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment