git-svn-id: http://moon:8086/svn/matlab/trunk@153 801c6759-fa7c-4059-a304-17956f83a07c
14 lines
303 B
Matlab
Executable File
14 lines
303 B
Matlab
Executable File
% a = alpha(xs,xl,nl,pl,es,dts,pa)
|
|
function a = alpha(xs,xl,nl,pl,es,dts,pa)
|
|
|
|
N = lge(xs);
|
|
|
|
for n = 1:N,
|
|
if((xs(n) > pl*xl(n)) & (dts(n)*es(n) >= pa*es(n)))
|
|
% a(n) = ((es(n)-nl(n)+0.001)/(es(n)+0.001))^2;
|
|
a(n) = max(1-nl(n)/(es(n)+0.008),0)^2;
|
|
else
|
|
a(n) = 0;
|
|
end;
|
|
end;
|