Home > wafo > wsim > private > comb2pro.m

# comb2pro

## PURPOSE

Probability vector of placing a cycle on a specific place given all combinations

## SYNOPSIS

prob=comb2pro(combinations,freq)

## DESCRIPTION

```  COMB2PRO Probability vector of placing a cycle on a specific place given all combinations

Calculates the probability vector of placing a cycle on a specific place
given the number of possible places (combinations).```

## CROSS-REFERENCE INFORMATION

This function calls:
This function is called by:
 fr2res Generates a stationary residual from the frequency matrix. rfc2load_fat Recontructs a load process given the frequency matrix (and residual).

## SOURCE CODE

```01 function prob=comb2pro(combinations,freq)
02 % COMB2PRO Probability vector of placing a cycle on a specific place given all combinations
03 %
04 %  Calculates the probability vector of placing a cycle on a specific place
05 %  given the number of possible places (combinations).
06
07 %  Copyright 1993, Mats Frendahl & Igor Rychlik,
08 %  Dept. of Math. Stat., University of Lund.
09
10 denominator=combinations+freq-1;
16 %pp=nominator./denominator;
17 %pp=1./(1+lambda);
19 %pp=exp(-lambda);
20 pp=pp';
21
22 tmp=zeros(length(pp),1); prob=zeros(length(pp),1);
23 tmp(1)=1;
24 for i=2:length(pp), tmp(i)=tmp(i-1)*pp(i-1); end
25 prob=[tmp(length(tmp))*pp(length(pp)) (1-pp).*tmp'];
26
27
28```

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group

Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003