473,386 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

data fitting with php

Hi php pros,

I have an array containing n numbers and want to fit them to e.g. a
polynomial function f(x), x=1...n.

Is there a php script / library for doing that?

I basically wish to do curve fitting to my data array, directly in
php.

Ideal would be something like polyfit in MatLab.
One possibility would be to involve a c++ program doing the data
fitting. Export the array as a dump file from php, execute the
compiled c++ polynomial fitting file program calling the dump file and
saving the result, and then open the result file in php. Thats of
course not so elegant ...

Thanks for any help.

Best

-saudepp

Sep 6 '07 #1
1 3094
On Sep 6, 4:01 pm, "saud...@googlemail.com" <saud...@googlemail.com>
wrote:
Hi php pros,

I have an array containing n numbers and want to fit them to e.g. a
polynomial function f(x), x=1...n.

Is there a php script / library for doing that?

I basically wish to do curve fitting to my data array, directly in
php.

Ideal would be something like polyfit in MatLab.
One possibility would be to involve a c++ program doing the data
fitting. Export the array as a dump file from php, execute the
compiled c++ polynomial fitting file program calling the dump file and
saving the result, and then open the result file in php. Thats of
course not so elegant ...

Thanks for any help.

Best

-saudepp
there are COM objects (sold) which you can invoke from within PHP,
other than that, writing your own spline model seems a challenge just
to avoid the inelegance of using an existing c++ program.
dont reinvent the wheel eh!
by f(x) do you mean a cubic polynomial?

Sep 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Grant Edwards | last post by:
I'm looking for a surface fitting library for Python. Something like the least-squares module in scientific python, except I want to fit a surface (z = f(x,y)) instead of a curve (y = f(x)). ...
6
by: Ron Kneusel | last post by:
Is there a python package out there that supports fitting a set of 2D points to an ellipse? I haven't been able to find one. Thanks! Ron
4
by: Roy Smith | last post by:
In the recent "transforming a list into a string" thread, we've been discussing the fact that list.pop() is O(1), but list.pop(0) is O(n). I decided to do a little timing experiment. To be sure,...
2
by: Grant Edwards | last post by:
I've been looking for some way to approximate scattered 3D data points in Python. The data doesn't seem to be amenable to fitting functions like polymials, so I may have to use something more...
1
by: Mahesh | last post by:
Hi, I need a javascript code for fitting the background image to the window. Help will be appreciated. Thanks, Mahesh
2
by: Niraj | last post by:
Hi, I am trying to do bulk insert of binary data (array of bytes) in an Oracle table. The data type of the table is BLOB. I am using Oracle Objects for OLE (OO4O) in C++. The binary data that I...
3
by: narasimha | last post by:
Hello, I have a data record with two fields...<value, date>. I have more than a million of these records. As I add more records into this set, I want a data structure that would be efficient...
3
by: To Forum | last post by:
hi, i am looking for a library in C++ which enables me to fit a function to a set of data...ideally in pure STL C++... Please share your insight on the subject. my thanks TF
4
by: Evelien | last post by:
Dear python-users, I am trying to do a non-linear least squares fitting. Maybe trying is not the best word, as I already succeeded in that. At the moment I am using leastSquaresFit from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.