Skip to content
Snippets Groups Projects
Commit 95316cef authored by marwan's avatar marwan
Browse files

code refreshed

parent 440f7ed7
No related branches found
No related tags found
No related merge requests found
......@@ -21,14 +21,17 @@ function h = french(m,flag)
% $Revision$
%
% $Log$
% Revision 2.1 2004/11/10 07:07:51 marwan
% initial import
%
if nargin < 1
m = size(get(gcf,'colormap'),1);
m = size(get(gcf,'colormap'),1);
else
if isempty(m)
m = size(get(gcf,'colormap'),1);
end
if isempty(m)
m = size(get(gcf,'colormap'),1);
end
end
if nargin < 2, flag = 1; end
......@@ -37,19 +40,19 @@ n2 = fix(m/4);
n3 = fix(m/2);
switch flag
case 1
r = [ones(n3,1); (sqrt(1-((1:n3)/n3).^2))'];
g = [flipud( (sqrt(1-((1:n3)/n3).^2))'); (sqrt(1-((1:n3)/n3).^2))'];
b = [flipud((sqrt(1-((1:n3)/n3).^2))'); ones(n3,1)];
case 2
r = [ones(n1+n2,1); (n1-1:-1:0)'/n1;];
g = [(0:n1-1)'/n1; ones(n2,1); (n1-1:-1:0)'/n1;];
b = [(0:n1-1)'/n1; ones(n1+n2,1);];
case 1
r = [ones(n3,1); (sqrt(1-((1:n3)/n3).^2))'];
g = [flipud( (sqrt(1-((1:n3)/n3).^2))'); (sqrt(1-((1:n3)/n3).^2))'];
b = [flipud((sqrt(1-((1:n3)/n3).^2))'); ones(n3,1)];
case 2
r = [ones(n1+n2,1); (n1-1:-1:0)'/n1;];
g = [(0:n1-1)'/n1; ones(n2,1); (n1-1:-1:0)'/n1;];
b = [(0:n1-1)'/n1; ones(n1+n2,1);];
end
h = [r g b];
if size(h,1)<m
h(ceil(m/2)+1:m,:)=h(ceil(m/2):end,:);
h(ceil(m/2),:)=1;
if size(h,1) < m
h(ceil(m/2)+1:m,:) = h(ceil(m/2):end,:);
h(ceil(m/2),:) = 1;
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment