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?
@@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
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?
@@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 )
@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.
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.
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.
@@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.
@@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
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!
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!
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.
@@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.
how to integrate multi objective particle swarm optimization with golden section selction in matlab ..icant
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?
@@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
please ..can any one helpe me ..i need to integrete muli objective particle swarm optimization with golden section selection in matlab
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?
@@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 )
@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.
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.
@@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
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?
The trick is in the "if" statements. I should create a slide to show the differences. Give the if statements some thought.
@@empossible1577 thanks man, I was thinking from the "if" itself and kinda stuck on it. Thanks for the video and the reply!
Great video thanks for this
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.
I am unsure what type of calculation you need done. You want to perform the Golden Section search on a JPG image?
How can I use golden section method if there are two variables in the equation (x and y)?
If there are two variables, you no longer have a root-finding problem and so entirely different algorithms are needed.
what if the maximum is at the upper or lower bound?
That would be a poor choice for the bounds, but the algorithm would still converge I am pretty sure.
does the final answer give the minimum of the function?
This code is finding a maximum. It is easily modified to find a minimum.
CEM Lectures the visual part don’t work. My lines don’t move
@@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.
@@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
@@empossible1577 Can you give me some hints to turn it into a minimum, I still have not figured it out.
How about the function e-x -2cos x
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!
Why we use fU and fL ?
fU and fL are the upper and lower bounds for the function f.
Hi, Can you explain how you arrived at the formula for the percentage relative error?. Many thanks.
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!
Thank you very much
thanks bro
I thought the golden ration was 1.618. When plugging your g into a calculator it yields 0.618
R and 1/R are often both called the Golden Ratio.
shouldn't be
if f(x1)>f(x2)
xu=x1 end
instead of what you have
if f(x1)>f(x2)
xu=x2 end
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.
@@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.
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
@@andreimihoc7429 Glad you figured it out, but thank you for pointing out a potential mistake!
Thanks a lot
please , could you send me THE CODE !
The video is the code! Ha ha.
I will pass my exam soon i dont have time to tape, please send it to me, chetouaniyanis@gmail.com
@Norman Strickland yes and i had 3/20, thanks
you are unbelievable...