LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
amap2_assemble.m
1function AMAP = amap2_assemble(l1,l2,p1,p2,form)
2% Returns an AMAP(2) with the given parameters.
3
4if form == 1
5 AMAP = {[-1/l1 p1/l1; 0 -1/l2], ...
6 [(1-p1)/l1 0; (1-p2)/l2 p2/l2]};
7elseif form == 2
8 AMAP = {[-1/l1 p1/l1; 0 -1/l2], ...
9 [0 (1-p1)/l1; (1-p2)/l2 p2/l2]};
10else
11 error('Invalid form: should be either 1 (gamma > 0) or 2 (gamma < 0)');
12end