Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polyfit? #19

Closed
ggggggggg opened this issue Apr 7, 2015 · 2 comments
Closed

polyfit? #19

ggggggggg opened this issue Apr 7, 2015 · 2 comments

Comments

@ggggggggg
Copy link

I'd like to see a polyfit function somewhere in the julia ecosystem, is this the right place?

Something like

julia> function polyfit(x, y, n)
         A = [ float(x[i])^p for i = 1:length(x), p = 0:n ]
         Poly(A \ y)
       end
polyfit (generic function with 1 method)
julia> x = [0:10];
julia> y = x.^2-15*x+50;
julia> p=polyfit(x,y,2)
Poly(49.99999999999998 - 14.999999999999991x + 0.9999999999999991x^2)
@MTornen
Copy link

MTornen commented Aug 20, 2015

I have the same comment, maybe some sort of merger between CurveFit.jl and Polynomials.jl? CurveFit was giving me some compatibility warnings so downloaded linfit.jl from src and created by own module from it.

@jverzani
Copy link
Member

jverzani commented Jan 2, 2016

This function was just checked in. Thanks!

@jverzani jverzani closed this as completed Jan 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants