Skip to main content
14-Alexandrite
November 2, 2023
Solved

metodo de iteracion

  • November 2, 2023
  • 3 replies
  • 2834 views

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.

 

Best answer by Werner_E

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.

 

3 replies

25-Diamond I
November 3, 2023

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?

Ycarlos14-AlexandriteAuthor
14-Alexandrite
November 3, 2023

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

Werner_E25-Diamond IAnswer
25-Diamond I
November 3, 2023

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.

 

21-Topaz II
November 3, 2023

Capture.JPG

 

Root function is best

 

25-Diamond I
November 3, 2023

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

 

 

21-Topaz II
November 3, 2023

Capture.JPG