Home > src > BN_pol_rec > visualization > ptfc_getCmpThreat.m

ptfc_getCmpThreat

PURPOSE ^

SYNOPSIS ^

function cmp_threats = ptfc_getCmpThreat(threat_cell)

DESCRIPTION ^

 param: threat_cell - a cell array noOfOwn x noOfEnemies
 returns: cmp_threats - a row vector of the maximum threat of each company

 AUTHOR  Ronnie Johansson
 CREATED 2004-05-30
 ALTERED

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function cmp_threats = ptfc_getCmpThreat(threat_cell)
0002 %
0003 % param: threat_cell - a cell array noOfOwn x noOfEnemies
0004 % returns: cmp_threats - a row vector of the maximum threat of each company
0005 %
0006 % AUTHOR  Ronnie Johansson
0007 % CREATED 2004-05-30
0008 % ALTERED
0009 %
0010 
0011 [noOfOwnForces noOfCmps] = size(threat_cell);
0012 
0013 cmp_threats = [];
0014 
0015 for e=1:noOfCmps
0016   tmp_threats = [];
0017 
0018   for o=1:noOfOwnForces
0019     tmp_threats = max(threat_cell{o,e}.plt);
0020   end
0021 
0022   % store the threat which is the maximum for all own forces
0023   cmp_threats = [cmp_threats max(tmp_threats)]; 
0024 end
0025

Generated on Wed 16-Mar-2005 09:17:47 by m2html © 2003