Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!ecngs!feeder2.ecngs.de!feeder.erje.net!feeder.eternal-september.org!eternal-september.org!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: select remaining rows of my matrix
Date: Tue, 15 Sep 2009 09:42:10 -0500
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <h8o9cb$1t8$1@news.eternal-september.org>
References: <h8o7lg$rga$1@fred.mathworks.com> <h8o8s8$iq3$1@fred.mathworks.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.eternal-september.org U2FsdGVkX18gBDTFk3+g0DHc7S29mEoSl6S/bh1CrsTbownWtdktHO/TwHT/mloHVtCQfRP6BmhMt38crDjukJPEimlSM70IWNz7ijGPZEc6UKs3pCzuZGe/4uIh2rhlmJ86QD1xJAU=
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Tue, 15 Sep 2009 14:46:36 +0000 (UTC)
In-Reply-To: <HIDDEN>
X-Auth-Sender: U2FsdGVkX1+Mh6rH8QkH1UQUgH5rndds
Cancel-Lock: sha1:hKS2s84qRiX2gFnQrEB2vkRI7pU=
User-Agent: Thunderbird 2.0.0.22 (Windows/20090605)
Xref: news.mathworks.com comp.soft-sys.matlab:570512

Jos wrote:
> "Patrick Diviacco" <patrick.diviacco@gmail.com> wrote in message <h8o7lg$rga$1@fred.mathworks.com>...
>> hi,
>>
>> I've selected the first rows of matrix A
>>
>> TrainingSet1 = A(1:225,:);
>>
>> Is there any method to select the remaining columns instead of writing ?
>>
>> TestSet1 = A(226:300,:);
>>
>> thanks
> 
> What is wrong with it? It is very clear, concise and fast!

Agreed.

But, for a little more generality, you could name the first column 
boundary and use that plus END in the latter...

TSbound = 225;
TrSet = a(1:TSbound,:);
TstSet = a(Tsbound+1:end,:);

doc end

--