Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
|
|
@ -0,0 +1,4 @@
|
|||
function polyfit(x, y, n)
|
||||
A = [ float(x[i])^p for i = 1:length(x), p = 0:n ]
|
||||
A \ y
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
julia> x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
||||
julia> y = [1, 6, 17, 34, 57, 86, 121, 162, 209, 262, 321]
|
||||
julia> polyfit(x, y, 2)
|
||||
3-element Array{Float64,1}:
|
||||
1.0
|
||||
2.0
|
||||
3.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue