Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! Fitting line into 5 points

Status
Not open for further replies.

Petra Olah

Civil/Environmental
Jul 30, 2020
4
Hello everyone! :)

Is there anybody who could help me please?

I would like to fit a line into 5 fix points. I'm trying to do it with a function, but the problem is, that the x-axis has logarithmic scale.
Maybe I shoud use the loglinear version of the equation of the line, but it doesn't work...
Plase someone help me.

Thanks a lot!!!!
:)))
 
Replies continue below

Recommended for you

As mentioned in the other thread, if you post the data or worksheet, it'll be easier to help you.

Please also delete your starting post of the other thread to delete the thread.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
I did a quick Google search for "curve fitting with Mathcad" and found lots of sites that address your query, either directly or indirectly. Here are three examples. The first two are from the PTC website (BTW, Mathcad has functions for logarithmic and exponential regression.) and the other is from a university in the Middle East:

A more general, non-Mathcad resource you may find useful is "Curve Fitting for Programmable Calculator," by William M. Kolb. It's nearly 40 years old, but is still available through used book sellers. This book covers many different regression models. I would tell you more, but my copy is at the office. It appears that a PDF is available on scribd.com and a few other sites.

If you ever have more exotic curve fitting needs, I suggest CurveExpert: I have the Professional version. I bought it about seven (?) years ago to try out different methods of approximating the Colebrook-White Equation (for hydraulics). Oh, and to address a curve fitting problem at work. :) (I wanted to try more than what the built-in capabilities in Excel and Mathcad were giving me.) I have also used CurveExpert to help me reverse engineer some complex nomographs.


============
"Is it the only lesson of history that mankind is unteachable?"
--Winston S. Churchill
 
It's a pretty straightforward thing; Excel can do the fitting with its trendline option and displaying its equation, which should take all of about 5 minutes.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
IRstuff.
I want to do it with Mathcad because I have more thing to do with the task. It's just a little part of it.
Okay, here it is:
help_ih8ne7.png

In the graph you can see the elements of the matrix A. I put a circle around them. So what I want is to make the green line with a function. The green line must fit into the 5 points of the matrix A. Can you please help me?

I upload the picture I made to explain my problem and I also upload the mathcad file.


 
Much ado about nothing; the segment is basically a straight line, and would be a perfect straight line, except that you seem to have a typo at the fourth data point, since you have 952 , but f(950)
line_dcoik0.png


TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor