Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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 me puede orientar.
Solved! Go to Solution.
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
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.
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).
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
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.
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:
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.