Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
View Tickets
Search
Context Navigation
Back to Ticket #7383
Ticket #7383
: flatBG.m
File flatBG.m,
226 bytes
(added by Mike Thomas,
7 years
ago)
Line
1
function C = flatBG(x,y,sig,A)
2
%Gaussian 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 + (y(i)-A)^2;
8
else
9
C = C + ((y(i)-A)/sig(i))^2;
10
end
11
end
Download in other formats:
Original Format