Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!news2.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: john <mushtaq.jaffar@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: random vector generation within specific values
Date: Thu, 22 Jul 2010 17:10:54 EDT
Organization: The Math Forum
Lines: 11
Message-ID: <1592537430.38822.1279833090745.JavaMail.root@gallium.mathforum.org>
References: <i2aajd$nvb$1@canopus.cc.umanitoba.ca>
NNTP-Posting-Host: gallium.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1279833090 21950 144.118.94.39 (22 Jul 2010 21:11:30 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Thu, 22 Jul 2010 21:11:30 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:655391

kindly find here the code i want to implement:

%%% CODE

search_Range=[-2.45 +2.45] % here i want to mention values between -2.45 and +2.45 but no values less than +0.65 or -0.65

pop_Size= 10;

indiv_Size = 30;

population(1:pop_Size,1:indiv_Size)=search_Range(1)+(search_Range(2)-search_Range(1))*rand(pop_Size,indiv_Size);