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

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

#1 Objavljeno: 9. 2. 2024. 21:27:16
Valery Ochkov

Valery Ochkov

75 svidjanja u 735 postova.

Grupa: User

See please the attached file.Newton.sm (23,6 KiB) preuzeto 1676 put(ova).
#2 Objavljeno: 9. 2. 2024. 23:38:00
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 svidjanja u 181 postova.

Grupa: 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
1 korisnika je svidelo ovu objavu
Valery Ochkov 10. 2. 2024. 14:37:00
#3 Objavljeno: 10. 2. 2024. 14:38:31
Valery Ochkov

Valery Ochkov

75 svidjanja u 735 postova.

Grupa: User

Thanks
But see "???" in the attach
Newton-for-1-2-3-4.sm (26,47 KiB) preuzeto 1596 put(ova).

#4 Objavljeno: 10. 2. 2024. 18:38:42
StvMath

StvMath

44 svidjanja i 1 nesvidjanja u 76 postova.

Grupa: User

Here's a "while" version

while.png
Newton-for-1-2-3-4_b.sm (18,98 KiB) preuzeto 1647 put(ova).
1 korisnika je svidelo ovu objavu
Valery Ochkov 10. 2. 2024. 19:44:00
#5 Objavljeno: 11. 2. 2024. 01:58:11
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

As well, while associates with Bolean Critical region

Solve [Dichotomy_Newton_Secant] Copy.sm (52,75 KiB) preuzeto 1523 put(ova).
1 korisnika je svidelo ovu objavu
Valery Ochkov 11. 2. 2024. 02:13:00
#6 Objavljeno: 11. 2. 2024. 02:53:28
Valery Ochkov

Valery Ochkov

75 svidjanja u 735 postova.

Grupa: User

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

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

Wrote

oots vs Newton


No interest vs the codes

#8 Objavljeno: 11. 2. 2024. 13:41:06
Valery Ochkov

Valery Ochkov

75 svidjanja u 735 postova.

Grupa: User

Wrote

Wrote

Roots vs Newton


No interest vs the codes



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

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: User

roots solves Matrix.

Worksheet33.sm (6,96 KiB) preuzeto 1616 put(ova).
#10 Objavljeno: 13. 2. 2024. 06:19:59
Martin Kraska

Martin Kraska

1.369 svidjanja u 2.283 postova.

Grupa: Moderator

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

mNewton.sm (16,22 KiB) preuzeto 1691 put(ova).
mNewton.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 korisnika je svidelo ovu objavu
Alvaro 29. 2. 2024. 12:13:00
  • Novi postovi
  • Nema novih postova