Hello! Very nice video, thanks! I would like to find the first 6 roots of a function that has a root between every 0:3 interval (there is a root in the interval between 0 an 3, then there is another root in the interval between 3 and 6, then another in the interval between 6 and 9 and continues forever...). Do you know how can I variate the interval to find this 6 first roots? It would be very helpful. Thanks!
Hi, Thanks for asking a question. In this code, we want that there should be a maximum limit on the number of times the loop will operate. This is to prevent getting stuck into an infinite loop. The variable that we are using to do this is called maxN. Before starting the while loop we initialize the value as 100. And every time inside the loop we reduce it by 1. So, maxN = maxN - 1; says.. reduce the value of maxN by 1 and store it again in the same variable. I hope this helps. Please get back to us for any other queries. Regards, Elijah
Very good explanation. Learn
Hello! Very nice video, thanks!
I would like to find the first 6 roots of a function that has a root between every 0:3 interval (there is a root in the interval between 0 an 3, then there is another root in the interval between 3 and 6, then another in the interval between 6 and 9 and continues forever...). Do you know how can I variate the interval to find this 6 first roots? It would be very helpful. Thanks!
Good Explanaition
Thanks man..
Learned from this thanks
what does it mean by MaxN? and MaxN=MaxN-1?
Hi,
Thanks for asking a question.
In this code, we want that there should be a maximum limit on the number of times the loop will operate. This is to prevent getting stuck into an infinite loop. The variable that we are using to do this is called maxN.
Before starting the while loop we initialize the value as 100.
And every time inside the loop we reduce it by 1.
So, maxN = maxN - 1; says.. reduce the value of maxN by 1 and store it again in the same variable.
I hope this helps. Please get back to us for any other queries.
Regards,
Elijah