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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

metodo de iteracion

CY_10812282
8-Gravel

metodo de iteracion

Buenas tardes, estoy intentando programar para calcular el acero requerido por el método de iteracion, tengo dudas con el operador while, por favor si alguien. el archivo esta en Mathcad Prime 8.0.0.0 iteration.jpgme puede orientar.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Now you changed the value of Mu from 13.5 to 15.55!!!

So Terrys guess about what you want to achieve was correct.

If you just need the (last) value of As you should resort to the "root" function as Terry had shown.

If for some reason you need the whole table you should have a look at the program in my second answer here

Werner_E_1-1698977807261.png

The method of using a eternal loop (while 1 ...) and breaking out if the precision is reached was chosen because unfortunately Prime does not offer a "do ... while" loop (also known as "repeat ... until" in some programming languages).

 

Please note that when using the root-function you should set the value of the system variable TOL to a lower value (default is 10^-3) to achieve a better precision.

 

View solution in original post

7 REPLIES 7

Sie müssten den Iterationsvorgang schon genauer beschreiben und auch erklären, was das Ziel ist, also was die Abbruchbedingung sein soll.

Mit den Formeln die Sie eingegeben haben lassen sich aber die Werte in der gezeigten Tabelle nicht erzielen.

Was ist denn das Ziel? Offenbar nicht, das As =0 werden soll, oder?

Muchas gracias por darse la molestia de revisar. El objetivo es que la iteración se detenga cuando la diferencia entre el último As y el penúltimo As sea cero ( sean iguales). 

 

iteration.png

Now you changed the value of Mu from 13.5 to 15.55!!!

So Terrys guess about what you want to achieve was correct.

If you just need the (last) value of As you should resort to the "root" function as Terry had shown.

If for some reason you need the whole table you should have a look at the program in my second answer here

Werner_E_1-1698977807261.png

The method of using a eternal loop (while 1 ...) and breaking out if the precision is reached was chosen because unfortunately Prime does not offer a "do ... while" loop (also known as "repeat ... until" in some programming languages).

 

Please note that when using the root-function you should set the value of the system variable TOL to a lower value (default is 10^-3) to achieve a better precision.

 

Here is a variant which makes better/more logical use of the while loop (at the cost of the extra variable DeltaAs).

It creates the very same table as my suggestion above.

Werner_E_0-1699025371803.png

 

If for you just need the last value of As and for some reason don't want to use Primes numerical algorithms, you may do it that way:

Werner_E_1-1699025722381.png

 

 

Capture.JPG

 

Root function is best

 

Wenn Terrys Vermutung richtig ist und Sie es eher umständlich mit der selbst implementierten Iteration machen müssen und Sie die ganze Tabelle benötigen, wäre das Folgende eine Möglichkeit. Es ist nicht notwendig, a zu ändern, denn das geschieht durch die Iteration von selbst.

Werner_E_1-1698974385472.png

 

 

Capture.JPG

Top Tags