MATLAB Session -- Golden Section Search Visualization

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024
  • НаукаНаука

Комментарии • 13

  • @EL-Baiye95
    @EL-Baiye95 6 лет назад

    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))));

    • @empossible1577
      @empossible1577  6 лет назад

      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?

  • @Sublime_37
    @Sublime_37 6 лет назад

    Is this to find the minimum or maximum.

    • @empossible1577
      @empossible1577  6 лет назад

      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.

  • @kaichang4654
    @kaichang4654 6 лет назад

    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.

    • @empossible1577
      @empossible1577  6 лет назад

      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.

    • @kaichang4654
      @kaichang4654 6 лет назад +2

      Thank you so much! It is very helpful!

    • @EL-Baiye95
      @EL-Baiye95 6 лет назад

      @@empossible1577
      I can't really tell.
      Am not quite good in programming nor writing scripts

  • @prestonharris7406
    @prestonharris7406 4 года назад

    this doesnt work, my plot just stays still

  • @ahmedpervaiz4283
    @ahmedpervaiz4283 6 лет назад

    please can you send me the code in m file

    • @empossible1577
      @empossible1577  6 лет назад +1

      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!

    • @ahmedpervaiz4283
      @ahmedpervaiz4283 6 лет назад +1

      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

  • @taracat862
    @taracat862 4 года назад

    thank you