Skip to content

Commit

Permalink
data sparse
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardBerman committed May 23, 2024
1 parent 552038c commit 845a205
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions interpolate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ function polynomial_optimizer(degree, x_data, y_data, z_data; median_constraint=
if median_constraint == true
coefficients[1] = median(filter(!isnan, z_data))
end
if length(z_data) < 5
coefficients = zeros(length(coefficients))
coefficients[1] = median(filter(!isnan, z_data))
end
return coefficients
end

Expand Down

0 comments on commit 845a205

Please sign in to comment.