Hey Rupert,

Let me have a look when I have a little bit of time and I'll get back to
you.

Fran

On Thu, Nov 2, 2017, 15:41 'Rupert Smith' via Elm Discuss <
[email protected]> wrote:

> On Wednesday, November 1, 2017 at 8:38:48 PM UTC, Rupert Smith wrote:
>>
>> How would I write a curve fitting alrogithm with this? So I have a 3rd
>> order polynomial:
>>
>> y = a + b.x + c.x^2 + d.x^3
>>
>> and some linear algebra on 100 data points will yield values for a, b, c
>> and d. I'll post up the python code tomorrow, it seems to use an in-built
>> fit_curve() function.
>>
>
> Here is the NumPy code that I would like to convert to NumElm:
>
> import time
> import numpy as nm
>
> def get_curve(measurements, timestamps):
>   y = measurements
>   x = timestamps
>   z = nm.polyfit(x, y, 3)
>   f = nm.poly1d(z)
>
>
>   return f
>
>
> but polyfit and poly1d have not been ported to NumElm. I will take a look
> into how to port them.
>
> Rupert
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to