Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Re: How to call values from a table and then do the minerr() calculation?

$
0
0

Not sure if you have noticed that I changed the attached file in the foregoing post (now with a _3 at the end). The one with the _2 had an error, maybe there still are some in as in lack of the Excel data and the formula for M.k() I only see red errors and have to work somewhat blindfolded.

 

Finally I need to define "measure_t-theory_t=0" to use minerr(TTs).

Either this or use the sum of squared as you had defined.

 

Two question:

1) Do you mean that when minerr() internal deternine the next set TTs, the above sequence will be repeated again and again until the minimum error is founded?

Basically yes. Minerr() will by default use the Levenberg-Marquardt algorithm (which usually is a good choice anyway) to "jiggle" the elements of the vector TT until it thinks it has found the minimum error. Its a numerical algorithm and so it has its flaws and drawbacks. It may depend on the guess values if a fit is found at all and how good it is. Also there is a chance of numerical inaccuracies making the result useless or avoiding a convergence. Sometime scaling the data would be necessary,...

 

2) The example code is very straight forward. I mean there is no complex structure (loop, if.....). Do you think my goal can be done without any complex structure?

I always think there should be something complicated inside because I want n's be formed from the file database containg linear interpolation.

You will probably have one or more loops in the definition of "make_M_sum()" which, as I see it, is the only part missing in the sheet now (apart from graphing at the end). And yes, I think it could be done that way. And it only looks less complex now because we got rid of addressing the single variables TT.i, n.i and (hopefully) M.i and used vector notation instead - the underlying complexity still remains. Your n-values ARE constructed using the two interpolating fuctions f() and g() you had setup. You would have to use the result of make_n() in the routine which deals with your M's (I suggestes make_MSum() in the sheet). Without knowing about your data and the way your M's are built its hard to say if you will have success. At least I guess that the iteration process will take quite some time - dealing with 26 parameters to play with is probably not that easy.


Viewing all articles
Browse latest Browse all 12488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>