Home > Mateda2.0 > otherfiles > FindAccCard.m

FindAccCard

PURPOSE ^

[AccCard] = FindAccCard(length,Card)

SYNOPSIS ^

function [AccCard] = FindAccCard(length,Card)

DESCRIPTION ^

 [AccCard] = FindAccCard(length,Card)

 FindAccCard:  Finds the accumulative cardinality of a set of variables
 whose cardinality is in Card.
 INPUT:
 length: length of the vector
 Card: Cardinality of the variables
 OUTPUT: 
 AccCard: The product of cardinalities of previous  variables, 
          where the first variable is  the first one to the left.

 Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [AccCard] = FindAccCard(length,Card)
0002 % [AccCard] = FindAccCard(length,Card)
0003 %
0004 % FindAccCard:  Finds the accumulative cardinality of a set of variables
0005 % whose cardinality is in Card.
0006 % INPUT:
0007 % length: length of the vector
0008 % Card: Cardinality of the variables
0009 % OUTPUT:
0010 % AccCard: The product of cardinalities of previous  variables,
0011 %          where the first variable is  the first one to the left.
0012 %
0013 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0014 
0015 
0016  AccCard(length) = 1;
0017 
0018 for i=length-1:-1:1
0019     AccCard(i)=AccCard(i+1)*Card(i+1);
0020  end

Generated on Fri 04-Dec-2009 13:38:29 by m2html © 2003