MATLAB Session -- Golden Section Search

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 48

  • @hawraaateyah5491
    @hawraaateyah5491 2 роки тому +1

    how to integrate multi objective particle swarm optimization with golden section selction in matlab ..icant

    • @empossible1577
      @empossible1577  2 роки тому +1

      Have you coded both individually? If not, I highly recommend doing that first. After that, I am not sure what you have in mind to combine the two. One way you can do it is to first program a PSO. Then, each time you are to perform an evaluation of a particle, you perform a GSS to find a local extreme and move the particle to that position. Does this make sense?

    • @hawraaateyah5491
      @hawraaateyah5491 2 роки тому

      @@empossible1577 yes i coded multi objective particle swarm optimization in matlap .if you want to sent for you copy from my job in matlab to continou with taxi cab

  • @hawraaateyah5491
    @hawraaateyah5491 2 роки тому +1

    please ..can any one helpe me ..i need to integrete muli objective particle swarm optimization with golden section selection in matlab

    • @empossible1577
      @empossible1577  2 роки тому

      Have you coded both individually? If not, I highly recommend doing that first. After that, I am not sure what you have in mind to combine the two. One way you can do it is to first program a PSO. Then, each time you are to perform an evaluation of a particle, you perform a GSS to find a local extreme and move the particle to that position. Does this make sense?

    • @hawraaateyah5491
      @hawraaateyah5491 2 роки тому

      @@empossible1577 please i want to make a vedio that explaine how to integrate mopso with golden section (because i need for it to converges element of archive )

  • @aggelosphyzx4065
    @aggelosphyzx4065 4 роки тому +1

    @CEM Lectures I tried the same algorithm (with reversed inequalities to find the minimum) with the test function (x-3)^2. When the starting interval is something like [0,10] it gives xmin=3 as expected.However, when the starting interval is something like [-100,100] it gives nonsense and I don't know why. By nonsense I mean it produces a negative number.

    • @empossible1577
      @empossible1577  4 роки тому

      Hmmm...strange. I recommend visualizing your method and displaying all parameters each iteration. This should tell you what is wrong. I suspect you have a small little misplaced negative sign or something like that. Those are very hard to find. Sometimes you can only find that looking at everything each iteration.

    • @aggelosphyzx4065
      @aggelosphyzx4065 4 роки тому

      @@empossible1577 well it is a plain copy of what you implemented but if you tried it and get a good result probably I missed something

  • @thedundun5754
    @thedundun5754 3 роки тому +1

    Great video man, but I still don't get the part where we can know if our result is maximum or minimum? or the answer is always maximum?

    • @empossible1577
      @empossible1577  3 роки тому +1

      The trick is in the "if" statements. I should create a slide to show the differences. Give the if statements some thought.

    • @thedundun5754
      @thedundun5754 3 роки тому

      @@empossible1577 thanks man, I was thinking from the "if" itself and kinda stuck on it. Thanks for the video and the reply!

  • @anthonykerl19
    @anthonykerl19 6 років тому +3

    Great video thanks for this

  • @KhanMuhammadBabarPA
    @KhanMuhammadBabarPA 4 роки тому

    Can you please tell me, how can we quantify the golden ratio of the JPG/tiff or any image format? For example; there is a print advertisement (visual image), and we want to quantify it in MATLAB; so can we quantify it? Please let me know; I will so grateful to you.

    • @empossible1577
      @empossible1577  3 роки тому

      I am unsure what type of calculation you need done. You want to perform the Golden Section search on a JPG image?

  • @vishaldolas1506
    @vishaldolas1506 5 років тому

    How can I use golden section method if there are two variables in the equation (x and y)?

    • @empossible1577
      @empossible1577  5 років тому +1

      If there are two variables, you no longer have a root-finding problem and so entirely different algorithms are needed.

  • @brynmgl29
    @brynmgl29 3 роки тому

    what if the maximum is at the upper or lower bound?

    • @empossible1577
      @empossible1577  3 роки тому

      That would be a poor choice for the bounds, but the algorithm would still converge I am pretty sure.

  • @prestonharris7406
    @prestonharris7406 4 роки тому

    does the final answer give the minimum of the function?

    • @empossible1577
      @empossible1577  4 роки тому

      This code is finding a maximum. It is easily modified to find a minimum.

    • @prestonharris7406
      @prestonharris7406 4 роки тому

      CEM Lectures the visual part don’t work. My lines don’t move

    • @empossible1577
      @empossible1577  4 роки тому

      @@prestonharris7406 There is no visualization in this video. Maybe your talking about another one? Did you include "drawnow" in your code? This forces MATLAB to update the figure window.

    • @prestonharris7406
      @prestonharris7406 4 роки тому +1

      @@empossible1577 Sorry i just went back and looked to discover i wrote the code outside of the while loop. Thank you for the help, now i must figure out how to change to a minimum

    • @prestonharris7406
      @prestonharris7406 4 роки тому

      @@empossible1577 Can you give me some hints to turn it into a minimum, I still have not figured it out.

  • @rosebiba9847
    @rosebiba9847 4 роки тому +1

    How about the function e-x -2cos x

    • @empossible1577
      @empossible1577  4 роки тому

      I have not plotted this function to say for sure, but it should be a matter of just entering the new function and the correct starting bounds. Give it a try!

  • @moniekaj1
    @moniekaj1 5 років тому

    Why we use fU and fL ?

    • @empossible1577
      @empossible1577  5 років тому

      fU and fL are the upper and lower bounds for the function f.

  • @safiyanusani8157
    @safiyanusani8157 4 роки тому

    Hi, Can you explain how you arrived at the formula for the percentage relative error?. Many thanks.

    • @empossible1577
      @empossible1577  4 роки тому

      I may call it that, but it is actually the relative difference between values from iteration to iteration. It is not an overall error. So it is just the difference in values between two iterations divided by the value at the newest iteration. Also, you can see all of notes on the course website:
      empossible.net/academics/emp4301_5301/
      Hope this helps!

  • @ram670351002
    @ram670351002 6 років тому +1

    Thank you very much

  • @vivekkumawat5328
    @vivekkumawat5328 3 роки тому +1

    thanks bro

  • @luisangel8285
    @luisangel8285 4 роки тому

    I thought the golden ration was 1.618. When plugging your g into a calculator it yields 0.618

    • @empossible1577
      @empossible1577  4 роки тому

      R and 1/R are often both called the Golden Ratio.

  • @fayezalshalan2250
    @fayezalshalan2250 5 років тому

    shouldn't be
    if f(x1)>f(x2)
    xu=x1 end
    instead of what you have
    if f(x1)>f(x2)
    xu=x2 end

    • @empossible1577
      @empossible1577  5 років тому

      If f(x1)>f(x2), then you know the extremum is on the left side of the interval. This means you will move all of the points on the right side of the interval toward the left to close in on the extremum. In this case x2 will become the new extreme right value which is xu. Thus we set xu = x2.

    • @andreimihoc7429
      @andreimihoc7429 5 років тому

      @@empossible1577 that still seems like it is backwards. My textbook says if f(x1)>f(x2), then the maximum is between (x2, xU) which is the right side of the interval. And therefore xL = x2.

    • @andreimihoc7429
      @andreimihoc7429 5 років тому +1

      you know what, I realized that you are defining x1 and x2 the opposite way that I am. I have x1 = xL + d and x2 = xU - d

    • @empossible1577
      @empossible1577  5 років тому +2

      @@andreimihoc7429 Glad you figured it out, but thank you for pointing out a potential mistake!

  • @taracat862
    @taracat862 4 роки тому

    Thanks a lot

  • @yanischetouani7392
    @yanischetouani7392 6 років тому

    please , could you send me THE CODE !

    • @empossible1577
      @empossible1577  6 років тому

      The video is the code! Ha ha.

    • @yanischetouani7392
      @yanischetouani7392 6 років тому

      I will pass my exam soon i dont have time to tape, please send it to me, chetouaniyanis@gmail.com

    • @yanischetouani7392
      @yanischetouani7392 5 років тому

      @Norman Strickland yes and i had 3/20, thanks

    • @nailtosun449
      @nailtosun449 5 років тому

      you are unbelievable...