Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: setting up groups for anova1 -large for loop issue
Date: Mon, 1 Jun 2009 09:40:11 -0400
Organization: The MathWorks, Inc.
Lines: 30
Message-ID: <h00ln8$1qi$1@fred.mathworks.com>
References: <gvvuda$437$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1243863592 1874 144.212.105.187 (1 Jun 2009 13:39:52 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Jun 2009 13:39:52 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
Xref: news.mathworks.com comp.soft-sys.matlab:543926



"Farah " <fr.rasheed@gmail.com> wrote in message 
news:gvvuda$437$1@fred.mathworks.com...
>I have to conduct anova1 on log2ratios (microarray) that I am binning in to 
>various segments based on biological selection. I have managed to set this 
>up though it was tedious to do. I basically have 89 segments some with only 
>30 elements and some with upwards of 5000. The value of each element is 
>totally independent and usually different from all others.
> The problem is constructing a 'group array' in order to do anova1 on my 
> segments.
> result=anova1(dataVector,groupVector)
>
> Currently I am building a for loop, ie. specifying elements between which 
> row numbers of the whole log2ratio file are to be categorized as group 1, 
> group2 and so on.
> But this means I have to manually type in 89 for-end loops.
> Does anyone know an easier way to do this?

Post a small sample of your code that shows how you generate your 
groupVector.  I'm willing to bet there's an easier way to do what you want 
than 89 FOR-loops.  [In particular, if you're generating 89 variables group1 
through group89, there's DEFINITELY a better way -- see Q4.6 in the 
newsgroup FAQ (http://matlabwiki.mathworks.com/MATLAB_FAQ) if that's what 
you're doing.]

-- 
Steve Lord
slord@mathworks.com