SMath Studio Forum
»
SMath Studio
»
Questions
»
iterative procedure programming
![Alexeng Alexeng](/forum/images/noavatar.gif) Rank: Newbie
Groups: Registered
Joined: 25/12/2023(UTC) Posts: 2
|
Hi everyone, I'm new to this forum, and somehow to Smath as well. I'm no mathematician, so I do apologize from the beginning for all the mistakes and errors and ignorance. I'm trying to set up an iterative procedure for solving an integral equation, but I cannot see any solution. I've tried to use a FOR cycle as well as a WHILE cycle. With both I can only see the end of the cycle if everything is set up for at most 4 iterations. Anything that involves more than 4 will result in the cycle to take an unreasonable amount of time (not proportional to the time it took for the first 4 iterations). For 4 iterations in takes less than a second, if a set up 6 iterations it takes 40 seconds (10 iterations, is 7 minutes and still counting). Please consider that I need to iterate the cycle for at least 10.000 steps. The same thing happens if I set a control variable for a WHILE cycle. Please let me know what is that I'm doing wrong. Thanks, Documento2.sm (8kb) downloaded 6 time(s).
|
|
|
|
![overlord overlord](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,129 ![Turkey Turkey](/forum/Content/images/flags/TR.png) Was thanked: 510 time(s) in 340 post(s)
|
Right click to for loop. Change Optimization to Numeric. This had speed it to 0.017s on my pc. Regards ![2023-12-25_16-37.png](/forum/resource.ashx?a=48838&b=2) Edited by user 26 December 2023 03:37:57(UTC)
| Reason: Not specified
|
|
|
|
![Jean Giraud Jean Giraud](/forum/resource.ashx?url=http%3a%2f%2fen.smath.info%2fforum%2fUploads%2f9678.PNG&width=100&height=100) Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 ![Canada Canada](/forum/Content/images/flags/CA.png) Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Alexeng ![Go to Quoted Post Go to Quoted Post](/forum/Themes/yafvision/icon_latest_reply.gif) I'm trying to set up an iterative procedure for solving an integral equation, Integration comes from integration techniques. What you call cycle loop is generally a while loop. It does not need pre-assigned steps. It auto-stop on the demanded accuracy of result. Click on Samples, visit Golden Ratio. Jean
|
|
|
|
![overlord overlord](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,129 ![Turkey Turkey](/forum/Content/images/flags/TR.png) Was thanked: 510 time(s) in 340 post(s)
|
PS: You can disregard what Jeans says, anything on any topic. You is the jester of this forum, the notorious buffoon. Answers he will give or already gave won't be related to what is asked. I don't know the real reason of his motivation under. But he always promotes his "nobody cares" samples.
As you can see, you asked to speed up your iteration. He gave you a lecture about integrations, what a loser.
|
|
|
|
![Alexeng Alexeng](/forum/images/noavatar.gif) Rank: Newbie
Groups: Registered
Joined: 25/12/2023(UTC) Posts: 2
|
I do apologize as I should have checked previous posts. I see the optimization solution in a recent post. This is definitely solving the point. Please don't fight to each other, maybe even in a non-related answer there is something to learn. Thanks to everyone for your time.
|
|
|
|
![overlord overlord](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,129 ![Turkey Turkey](/forum/Content/images/flags/TR.png) Was thanked: 510 time(s) in 340 post(s)
|
Originally Posted by: Alexeng ![Go to Quoted Post Go to Quoted Post](/forum/Themes/yafvision/icon_latest_reply.gif) I do apologize as I should have checked previous posts. I see the optimization solution in a recent post. This is definitely solving the point. Please don't fight to each other, maybe even in a non-related answer there is something to learn. Thanks to everyone for your time. You don't know him. All he mean is to show off. He has no intention to help, teach or learn. He also has been kicked from mathcad forums. We have been dealing with him even longer. Edited by user 26 December 2023 06:02:30(UTC)
| Reason: Not specified
|
|
|
|
![Jean Giraud Jean Giraud](/forum/resource.ashx?url=http%3a%2f%2fen.smath.info%2fforum%2fUploads%2f9678.PNG&width=100&height=100) Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 ![Canada Canada](/forum/Content/images/flags/CA.png) Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Alexeng ![Go to Quoted Post Go to Quoted Post](/forum/Themes/yafvision/icon_latest_reply.gif) I do apologize as I should have checked previous posts. I see the optimization solution in a recent post. This is definitely solving the point. Thanks for confirming it solved. Your project looks strangely an Isentropic Discharge. I have such a project for air. Jean
|
|
|
|
![overlord overlord](/forum/images/noavatar.gif) ![](/forum/Images/Ranks/Advanced-Member.png) Rank: Advanced Member Groups: Registered
Joined: 23/07/2013(UTC) Posts: 1,129 ![Turkey Turkey](/forum/Content/images/flags/TR.png) Was thanked: 510 time(s) in 340 post(s)
|
There is also eval() option. It stores numerical value of calculation. Without changing optimization to numeric; sometimes it makes loops faster too. Regards ![2023-12-26_16-56.png](/forum/resource.ashx?a=48839&b=2)
|
![thanks](/forum/Themes/yafvision/heart_small.png) 1 user thanked overlord for this useful post.
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
iterative procedure programming
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.