Ignore:
Timestamp:
Dec 3, 2011, 10:25:45 PM (12 years ago)
Author:
sommeria
Message:

many corrections, use of the new GUI civ with mask, grid and the new matlab civ1 and fix
pivlab now included in civ_matlab which contains all matlab subfunctions for civ.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/set_col_vec.m

    r313 r315  
    1010            % colcode.CName: 'ima_cor','black','white',...
    1111            % colcode.ListColorCode ='black', 'white', 'rgb','brg', '64 colors'
    12             % colcode.FixedCbounds =0; thresholds scaling relative to min and max, =1 fixed thresholds
    13             % colcode.MinC; min
    14             % colcode.MaxC; max
     12            % colcode.CheckFixVecColor =0; thresholds scaling relative to min and max, =1 fixed thresholds
     13            % colcode.MinVec; min
     14            % colcode.MaxVec; max
    1515            % colcode.ColCode1: first threshold for rgb, relative to min (0) and max (1)
    1616            % colcode.ColCode2: second threshold for rgb, relative to min (0) and max (1),
     
    1919% vec_C: matlab vector representing the scalar setting the color
    2020function [colorlist,col_vec,colcode_out]=set_col_vec(colcode,vec_C)
    21 
    2221col_vec=[];
    2322colcode_out=colcode;%default
     
    6160    col_vec=ones(size(vec_C));%all vectors at color#1
    6261elseif strcmp(colcode.ListColorCode,'rgb')|| strcmp(colcode.ListColorCode,'bgr')% 3 color representation
    63     ind1=find(vec_C < ColCode1); % =1 for red vectors
     62%    ind1=find(vec_C < ColCode1); % =1 for red vectors
    6463    ind_green=find((vec_C >= ColCode1) & (vec_C < ColCode2));% =1 for green vectors
    65     ind3=find(vec_C >= ColCode2);% =1 for blue vectors
     64%     ind3=find(vec_C >= ColCode2);% =1 for blue vectors
    6665    colorlist(2,:)=[0 1 0];%green
    67     col_vec(ind1)=1;
     66    col_vec(vec_C < ColCode1)=1;
    6867    col_vec(ind_green)=2;
    69     col_vec(ind3)=3;
     68    col_vec(vec_C >= ColCode2)=3;
    7069    if strcmp(colcode.ListColorCode,'rgb')
    7170        colorlist(1,:)=[1 0 0];%red
Note: See TracChangeset for help on using the changeset viewer.