Added source Matlab code for reference
This commit is contained in:
parent
b8af977117
commit
b5d99903d2
186 changed files with 61405 additions and 1 deletions
14
matlab/graph/giveColors.m
Normal file
14
matlab/graph/giveColors.m
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
function [colors] = giveColors(n)
|
||||
if n > 36
|
||||
error('Maximum number of colors 36');
|
||||
end
|
||||
colors = [1 0 0; 0 1 0; 0 0 1; 1 1 0 ; 1 0 1; 0 1 1; ...
|
||||
0.4 0 0; 0 0.4 0; 0 0 0.4; 0.4 0.4 0; 0.4 0 0.4; 0 0.4 0.4; ...
|
||||
0.2 0 0; 0 0.2 0; 0 0 0.2; 0.2 0.2 0; 0.2 0 0.2; 0 0.2 0.2; ...
|
||||
0.8 0 0; 0 0.8 0; 0 0 0.8; 0.8 0.8 0; 0.8 0 0.8; 0 0.8 0.8; ...
|
||||
0.6 0 0; 0 0.6 0; 0 0 0.6; 0.6 0.6 0; 0.6 0 0.6; 0 0.6 0.6; ...
|
||||
0.6 0.2 0.4; 0.2 0.4 0.8; 0.8 0.4 0.2; 0 0.6 0.2; 0.2 0.8 0.6; 0.5 0.2 0.1; ...
|
||||
0.6 0.3 0.1];
|
||||
colors = colors(1:n,:);
|
||||
% red; green; blue; yellow
|
||||
% RGB format: [red green blue]
|
||||
Loading…
Add table
Add a link
Reference in a new issue