iterative procedure programming

iterative procedure programming - help with cycles - Messages

#1 Posted: 12/24/2023 11:51:42 PM
Alessandro

Alessandro

0 likes in 2 posts.

Group: User

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 (7 KiB) downloaded 33 time(s).
#2 Posted: 12/25/2023 9:36:20 PM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

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
#3 Posted: 12/25/2023 9:48:31 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

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
#4 Posted: 12/25/2023 9:53:27 PM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

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.
#5 Posted: 12/25/2023 11:25:27 PM
Alessandro

Alessandro

0 likes in 2 posts.

Group: User

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.
#6 Posted: 12/26/2023 12:00:38 AM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

Wrote

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.
#7 Posted: 12/26/2023 9:09:16 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

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

#8 Posted: 12/26/2023 9:57:32 PM
overlord

overlord

547 likes in 1330 posts.

Group: Moderator

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
1 users liked this post
sergio 12/27/2023 5:56:00 PM
  • New Posts New Posts
  • No New Posts No New Posts