thanks but i tried this methode on this equation but i cant seem to do something right y = (310/5.0862)*((sin((314.1593*0.0025)-0.6658))-(sin(x-0.6658))*(exp((x-(314.1593*0.0025))/(314.1593*0.0025))));
You could try a simpler bracketing method like the bisection method to get your answer. It could also be that you don't have a good initial guess. Have you tried plotting the function and estimating the answer?
This specific example finds a maximum. You can easily modify your code to find a minimum. One easy way is to find the maximum of g(x) where g(x) = 1/f(x). Just make sure there are no zero crossings. The other way is to modify the code itself. The modification is the part of the code that compares f1 to f2. This will need to be swapped around to find a minimum instead of a maximum.
Thank you so much for sharing this tutorial video. Unfortunately, I coded in the same way but there is no results and the system is only in 'busy' status.
Hmmm... I suspect you have made a small typo in your code that causes the algorithm not to converge to the correct answer, thus it keeps running the main loop.
As a rule, I do not hand out the MATLAB codes because it puts students in a "code hacking" mode instead of a "code thinking" mode. I am essentially giving you the codes in these videos, but at least you have to listen to the video and hear my explanation of things. I strongly recommend truly learning the method and implementing it on your own. You will be much better off for it!
thanks
but i tried this methode on this equation but i cant seem to do something right
y = (310/5.0862)*((sin((314.1593*0.0025)-0.6658))-(sin(x-0.6658))*(exp((x-(314.1593*0.0025))/(314.1593*0.0025))));
You could try a simpler bracketing method like the bisection method to get your answer. It could also be that you don't have a good initial guess. Have you tried plotting the function and estimating the answer?
Is this to find the minimum or maximum.
This specific example finds a maximum. You can easily modify your code to find a minimum. One easy way is to find the maximum of g(x) where g(x) = 1/f(x). Just make sure there are no zero crossings. The other way is to modify the code itself. The modification is the part of the code that compares f1 to f2. This will need to be swapped around to find a minimum instead of a maximum.
Thank you so much for sharing this tutorial video. Unfortunately, I coded in the same way but there is no results and the system is only in 'busy' status.
Hmmm... I suspect you have made a small typo in your code that causes the algorithm not to converge to the correct answer, thus it keeps running the main loop.
Thank you so much! It is very helpful!
@@empossible1577
I can't really tell.
Am not quite good in programming nor writing scripts
this doesnt work, my plot just stays still
please can you send me the code in m file
As a rule, I do not hand out the MATLAB codes because it puts students in a "code hacking" mode instead of a "code thinking" mode. I am essentially giving you the codes in these videos, but at least you have to listen to the video and hear my explanation of things. I strongly recommend truly learning the method and implementing it on your own. You will be much better off for it!
CEM Lectures thank you i implement it and it is working but i need to do some changes in it according to my research work
thank you