Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with ga algorithm matlab

Status
Not open for further replies.

lamlam

Newbie level 3
Joined
Sep 29, 2011
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
Hello; I would like to use the function ga of the genetic algorithm toolbox toolbox , but my variables dont have lower an upper bounds, but each variable is include in data set (example: X1 takes values in {1,2,56,98}) How then can I include this information? Thanks
 

think about using the structure index to choose variables:

str={1,2,56,98}
bnd=length(str)

lower_bound=str(1)
upper_bound=str(bnd)

I wish it could help you!
 

Hello,
Thaks for you reply, but in your suggestion for example 3 is between lower_bound and lower_bound but it isn'y in str?
thanks
 

Hi lamlam,
My suggestion was as follow:

the lower_bound and upper_bound are respectively between 1 and length(str)
but you have to make a modification on selecting an element in this range in the way that you will work on str(selected_elt).

for exp:

str={1,2,56,98}
lower_bound=1
upper_bound=length(str)
%for the rest of your algorithm you have to modify all selected element (which are between lower and upper bound) and use it as an index for the str structure to get the corresponded element
str(slected_element)
%selected_elt is betwenn lower_bound and upper_bound.
I wish it could help you!

ps: can you please try to rely to this post about https://www.edaboard.com/threads/227798/ thank you!
Have a nice day!
 

Hi Kazis;
Thanks for your reply i will try it;
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top