Changeset 315 for trunk/src/set_col_vec.m
- Timestamp:
- Dec 3, 2011, 10:25:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_col_vec.m
r313 r315 10 10 % colcode.CName: 'ima_cor','black','white',... 11 11 % colcode.ListColorCode ='black', 'white', 'rgb','brg', '64 colors' 12 % colcode. FixedCbounds=0; thresholds scaling relative to min and max, =1 fixed thresholds13 % colcode.Min C; min14 % colcode.Max C; max12 % colcode.CheckFixVecColor =0; thresholds scaling relative to min and max, =1 fixed thresholds 13 % colcode.MinVec; min 14 % colcode.MaxVec; max 15 15 % colcode.ColCode1: first threshold for rgb, relative to min (0) and max (1) 16 16 % colcode.ColCode2: second threshold for rgb, relative to min (0) and max (1), … … 19 19 % vec_C: matlab vector representing the scalar setting the color 20 20 function [colorlist,col_vec,colcode_out]=set_col_vec(colcode,vec_C) 21 22 21 col_vec=[]; 23 22 colcode_out=colcode;%default … … 61 60 col_vec=ones(size(vec_C));%all vectors at color#1 62 61 elseif strcmp(colcode.ListColorCode,'rgb')|| strcmp(colcode.ListColorCode,'bgr')% 3 color representation 63 ind1=find(vec_C < ColCode1); % =1 for red vectors62 % ind1=find(vec_C < ColCode1); % =1 for red vectors 64 63 ind_green=find((vec_C >= ColCode1) & (vec_C < ColCode2));% =1 for green vectors 65 ind3=find(vec_C >= ColCode2);% =1 for blue vectors64 % ind3=find(vec_C >= ColCode2);% =1 for blue vectors 66 65 colorlist(2,:)=[0 1 0];%green 67 col_vec( ind1)=1;66 col_vec(vec_C < ColCode1)=1; 68 67 col_vec(ind_green)=2; 69 col_vec( ind3)=3;68 col_vec(vec_C >= ColCode2)=3; 70 69 if strcmp(colcode.ListColorCode,'rgb') 71 70 colorlist(1,:)=[1 0 0];%red
Note: See TracChangeset
for help on using the changeset viewer.