-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvista.m
46 lines (39 loc) · 1006 Bytes
/
vista.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%% ENTER THE COLORLAB
%
% >> colorlab.vista()
%
% To peak at the COLORLAB.
%
% If you are thrilled by the view: colorlab.enter() ✧
function vista()
folder = erase(fileparts(mfilename('fullpath')),'+colorlab');
% > COLORLAB introspects itself
if isoctave
p = genpath(folder);
disp(strsplit(p,pathsep));
else
xpathshow(folder); % Finer MATLAB option
end
% Would the user decide to enter... promote it!
fprintf('\n')
fprintf('↑↑↑ THIS IS THE COLORLAB ↑↑↑\n')
fprintf('\n')
fprintf(' > If you are thrilled: colorlab.enter() ✧ \n')
fprintf('\n')
end
% contains
function bool = isoctave()
%% ISOCTAVE Determines if you are running under GNU Octave or MATLAB
%
% >> isoctave()
%
% ans =
%
% logical
%
% 0 ----> IF running under MATLAB
% 1 ----> IF running under OCTAVE
%
% See also ispc, ismac, isunix, ver
bool = exist('__octave_config_info__','builtin') == 5;
end