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

Re: Iterations to convergence

$
0
0

One method to achieve your target would be to use a program 'while' statement.

 

First function (delta) will run the loop a given number of times & I have matched the iterations with your example so the result appears to be correct.

The next function (delta2) modifies this to loop until convergence.

 

It is possible for this to loop for ever so a counter to limit the max number of iterations is advised.

 

You will need to define the convergnce condition that you require, at the moment it is a simple sum of differences squared.

 

Hope this is helpful

 

 

Regards

     Andy


Viewing all articles
Browse latest Browse all 12488

Trending Articles



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