Home > SaliencyToolbox > combineMaps.m

combineMaps

PURPOSE ^

combineMaps - returns the sum of a vector of maps.

SYNOPSIS ^

function result = combineMaps(maps,label)

DESCRIPTION ^

 combineMaps - returns the sum of a vector of maps.

 resultMap = combineMaps(maps,label)
   Adds the data fields in the maps vactor and returns
   the result as a map with label as the label.

 See also dataStructures.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % combineMaps - returns the sum of a vector of maps.
0002 %
0003 % resultMap = combineMaps(maps,label)
0004 %   Adds the data fields in the maps vactor and returns
0005 %   the result as a map with label as the label.
0006 %
0007 % See also dataStructures.
0008 
0009 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0010 % by Dirk B. Walther and the California Institute of Technology.
0011 % See the enclosed LICENSE.TXT document for the license agreement.
0012 % More information about this project is available at:
0013 % http://www.saliencytoolbox.net
0014 
0015 function result = combineMaps(maps,label)
0016 
0017 result = maps(1);
0018 result.label = label;
0019 
0020 lm = length(maps);
0021 result.data = zeros(size(maps(1).data));
0022 for m = 1:lm
0023   result.data = result.data + maps(m).data;
0024 end
0025 
0026 result.date = clock;

Generated on Thu 18-Jul-2013 06:10:46 by m2html © 2005