cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Gauss- Newton Nonlinear Regression

TudorMarin
1-Visitor

Gauss- Newton Nonlinear Regression

By Faouizi Amar

gausenemt.png

  • Displays curve-fitting non-linear models using the Gauss-Newton regression method 
  • Important for many industries 
  • Shows how a FOR loop iterates through the algorithm until convergence of the model parameters is reached using Mathcad's in-line programming capabilities

     Curve fitting is often used to analyze and interpret experimental data, which is usually a large collection of points. The goal is to find a model function that fits the trend and level of the data. PTC Mathcad helps you to do this. 

     When fitting data to a particular model, it is common to transform the model to a linear one and then use some type of least squares regression. In many cases, it is not possible to transform the non-linear model into a linear one. Sometimes the transformation is possible but results in loss of sensitivity. Under such circumstances, direct non-linear regression should be used. There are many algorithms that have been developed specifically for this purpose. One such model is known as the Gauss-Newton algorithm.


     This Mathcad worksheet is used to implement the Gauss-Newton algorithm and shows how easy it is to ajdust and calculate using PTC Mathcad software.

     Download and explore this worksheet yourself! You can download a free lifetime copy of PTC Mathcad Express and get 30 days of full functionality.

9 REPLIES 9

Hello TudorMartin,

 

many thanks for this information. 

 

I have MathCAD 15 and unfortunately i cannot open the *.mcdx attachments, can you or someone share this with *,mcd extension please.

 

Thanks in advance.

 

Best regards,

Mohd

Please find this worksheet in PDF file format in attachment.

Also maybe you are interested in the following topic: https://community.ptc.com/t5/PTC-Mathcad-Questions/Mathcad-Nonlinear-Regression-Example-xmcd/td-p/447028

The file you are looking for was created way back more than 20 years ago (must be the time of Mathcad 5 or Mathcad 6) when programming capabilities were freshly introduced in Mathcad. I don't know if "genfit" or "minerr" were already available at that time, as it is those commands you would use nowadays to do the curve fitting job.

 

In the times of Mathsoft there was a huge library of valuable worksheets (including the one you are looking for) and articles available through their website but when PTC took over this library was destroyed.

And when they destroyed Mathcad by developing Prime they were in lack of contend and so they began to convert selected worksheets to Prime format. Mostly very old ones - probably because this increases the probability that no features of Mathcad are used which are still not implemented in Prime.

The conversion often was done rather amateurish and faulty but this one here seems to be OK.

The file was often referenced and included in postings in the old collab forum but PTC has destroyed most of this forum, too, when the migrated it in their Jive forum by omitting attachments and not adopting links.

 

Thanks to the internet archive, the WayBack machine, the original file can be conjured up anyway:

https://web.archive.org/web/20011121042029/http://www.mathcad.com/Library/LibraryContent/gausnewt.mcd

(see also attached)

 

But again, if you are just looking how to do curve fitting in Mathcad 15, look at the help and search this forum how to do it using genfit or a solve block with minerr.

Werner_E
25-Diamond I
(To:Werner_E)

Addendum:

Here you see how to arrive at the same results using a solve block with Minerr or the genfit command (without and with gradient vector):

Bild.png

 

P.S.: I add this as a separate reply rather than just editing my above post because I noticed that all of a sudden I am under moderation now and it took about four hours until my above reply was visible.

Any other long term forum contributors experiencing the same annoying problem?

 

EDIT: This post was visible all in a sudden as it should be - no moderation. Maybe the problem with the former was just kind of a hick-up.

Not sure though why I see my last post indented as a reply to Lucs Post and not as it should be as a reply to my former post.

LucMeekes
23-Emerald III
(To:Werner_E)

I have no clue, Warner. At the time I wrote and submitted my reaction, yours wasn't visible.
It's Xmas holiday. Maybe that slows down PTCs servers.....
Luc
Werner_E
25-Diamond I
(To:LucMeekes)

I was informed that something in my post triggered an autmatic filter and so the post was put in quarantine temporarily

Danke!

Dear Warner, Dear Luc,

 

many thanks for for your valuebale information. 

 

I am new at MathCAD and downloaded their free trial versions for 30 days, but still early days for me, but i am grateful to find this forum and hopefully will brush up my mathematics skills fast enough to use the full potential of this interesting software.

 

Best regards

M.

The file was created with Mathcad Prime.
You can download version 4 of this application from the PTC website, and install it as a trial version.
The trial version works in full mode for 30 days, then drops to simplified functionality, but still allows you to open all worksheets created with any version of Prime.
Note that at this moment many users (including me) find that mathcad 11 ...15 is still better than any version of Prime.
But, as indicated above, you can play with the full version for a month and judge for yourself.
Oh, and while Prime allows to convert a Mathcad .xmcd/.mcd file to its .mcdx format there is NO way to convert it back...other than rewriting yourself.

Success!
Luc
Announcements

Top Tags