Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
View Tickets
Search
Context Navigation
Back to Ticket #7383
Ticket #7383
: flatBGpo.m
File flatBGpo.m,
244 bytes
(added by Mike Thomas,
7 years
ago)
Line
1
function C = flatBGpo(x,y,sig,A)
2
%Poisson Cost function for flat background
3
C = 0;
4
A = A(1);
5
for i = 1:length(x)
6
if sig(i) == 0
7
C = C + 2*(A-y(i));
8
else
9
C = C + 2*((A-y(i))+y(i)*(log(y(i))-log(A)));
10
end
11
end
Download in other formats:
Original Format