Home > data-import > combine_macro_action_bid.m

combine_macro_action_bid

PURPOSE ^

SYNOPSIS ^

function combine_macro_action_bid(IDs)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function combine_macro_action_bid(IDs)
0002 subs = cIDs(IDs);
0003 
0004 for s = 1:numel(subs)
0005     data = [];
0006     for o = 1:3
0007         varname = sprintf('cstream_macro_direct_action-bid_obj%d_parent', o);
0008         if has_variable(subs(s), varname)
0009             tmp = get_variable(subs(s), varname);
0010             if isempty(data)
0011                 data = tmp;
0012             else
0013                 data = [data tmp(:,2)];
0014             end
0015         end
0016     end
0017     if ~isempty(data)
0018         cat = sum(data(:,2:end), 2);
0019         if max(cat) > 3
0020             error('max greater than 3');
0021         end
0022         final = [data(:,1) cat];
0023         record_variable(subs(s), 'cstream_macro_direct_action-bid_obj-all_parent', final);
0024         cev = cstream2cevent(final);
0025         record_variable(subs(s), 'cevent_macro_direct_action-bid_obj-all_parent', cev);
0026     end
0027 end
0028 end

Generated on Wed 24-May-2017 00:00:56 by m2html © 2005