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

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

#1 Posted: 2/9/2024 9:27:16 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

See please the attached file.Newton.sm (23 KiB) downloaded 29 time(s).
#2 Posted: 2/9/2024 11:38:00 PM
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

74 likes in 164 posts.

Group: 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 users liked this post
Valery Ochkov 2/10/2024 2:37:00 PM
#3 Posted: 2/10/2024 2:38:31 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Thanks
But see "???" in the attach
Newton-for-1-2-3-4.sm (26 KiB) downloaded 26 time(s).

#4 Posted: 2/10/2024 6:38:42 PM
StvMath

StvMath

35 likes in 56 posts.

Group: User

Here's a "while" version

while.png
Newton-for-1-2-3-4_b.sm (18 KiB) downloaded 22 time(s).
1 users liked this post
Valery Ochkov 2/10/2024 7:44:00 PM
#5 Posted: 2/11/2024 1:58:11 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

As well, while associates with Bolean Critical region

Solve [Dichotomy_Newton_Secant] Copy.sm (52 KiB) downloaded 23 time(s).
1 users liked this post
Valery Ochkov 2/11/2024 2:13:00 AM
#6 Posted: 2/11/2024 2:53:28 AM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

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

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

oots vs Newton


No interest vs the codes

#8 Posted: 2/11/2024 1:41:06 PM
Valery Ochkov

Valery Ochkov

55 likes in 633 posts.

Group: User

Wrote

Wrote

Roots vs Newton


No interest vs the codes



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

Jean Giraud

983 likes in 6866 posts.

Group: User

roots solves Matrix.

Worksheet33.sm (6 KiB) downloaded 26 time(s).
#10 Posted: 2/13/2024 6:19:59 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

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

mNewton.sm (16 KiB) downloaded 23 time(s).
mNewton.png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Alvaro Diaz Falconi 2/29/2024 12:13:00 PM
  • New Posts New Posts
  • No New Posts No New Posts