comparison toolboxes/graph_visualisation/graphViz4Matlab/util/addtosystempath.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function addtosystempath(p)
2 % Add p to the system path. If p is already on the path, this does nothing.
3 % Note, this change only persists for the duration of the Matlab session.
4 % Do not include path delimiters like ; or : .
5 % Example:
6 % addtosystempath('C:\Users\matt\bin');
7
8 if isempty(getenv('PATH')) || all(cellfun(@(c)isempty(c),strfind(tokenize(getenv('PATH'),pathsep()),p)));
9 setenv('PATH', [p, pathsep(), getenv('PATH'),]);
10 end
11
12 end