How can I use not a for but a while cycle?

How can I use not a for but a while cycle? - Mensajes

#1 Publicado: 9/2/2024 21:27:16
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

See please the attached file.Newton.sm (23,6 KiB) descargado 1630 vez(es).
#2 Publicado: 9/2/2024 23:38:00
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Greetings,

Instead of using for(3); you can use for(4):

for ▮, ▮, ▮
   ▮


The four parameter 「for(4)」 gives you the ability to loop while checking a condition. Below is the description of for( {0}, {1}, {2}, {3} )
"For loop. The function of controlled iterations. The cycle repeats {3}, while {0} satisfies the condition {1} and after each passage necessarily satisfied {2}. Repeating expressions can be set to any number of expressions."



example:
for i:=1, i<10, i:=i+2
   k:=2*i

Where 'i' starts at 1 and until i is no longer less than 10, perform operation of k:=2*i. Apply operation i:=i+2 and check if less then 10...; LOOP!


May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
A 1 usuarios les gustó este mensaje
Valery Ochkov 10/2/2024 14:37:00
#3 Publicado: 10/2/2024 14:38:31
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Thanks
But see "???" in the attach
Newton-for-1-2-3-4.sm (26,47 KiB) descargado 1565 vez(es).

#4 Publicado: 10/2/2024 18:38:42
StvMath

StvMath

44 me gusta y 1 no me gusta en 76 mensajes.

Grupo: User

Here's a "while" version

while.png
Newton-for-1-2-3-4_b.sm (18,98 KiB) descargado 1618 vez(es).
A 1 usuarios les gustó este mensaje
Valery Ochkov 10/2/2024 19:44:00
#5 Publicado: 11/2/2024 1:58:11
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

As well, while associates with Bolean Critical region

Solve [Dichotomy_Newton_Secant] Copy.sm (52,75 KiB) descargado 1491 vez(es).
A 1 usuarios les gustó este mensaje
Valery Ochkov 11/2/2024 2:13:00
#6 Publicado: 11/2/2024 2:53:28
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Roots vs Newton
2-17.png
#7 Publicado: 11/2/2024 7:55:50
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

Wrote

oots vs Newton


No interest vs the codes

#8 Publicado: 11/2/2024 13:41:06
Valery Ochkov

Valery Ochkov

67 me gusta en 713 mensajes.

Grupo: User

Wrote

Wrote

Roots vs Newton


No interest vs the codes



https://www.mdpi.com/2227-7390/10/19/3413
#9 Publicado: 11/2/2024 21:59:12
Jean Giraud

Jean Giraud

983 me gusta en 6.866 mensajes.

Grupo: User

roots solves Matrix.

Worksheet33.sm (6,96 KiB) descargado 1585 vez(es).
#10 Publicado: 13/2/2024 6:19:59
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

mNewton() from the Maxima plugin is another option. It also may fail for particular initial guess values.

mNewton.sm (16,22 KiB) descargado 1654 vez(es).
mNewton.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
A 1 usuarios les gustó este mensaje
Alvaro 29/2/2024 12:13:00
  • Nuevos mensajes
  • Sin mensajes nuevos