Path: news.mathworks.com!not-for-mail
From: "Twilighter " <mscmatlab@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matrix
Date: Fri, 8 Jul 2011 20:56:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <iv7qt9$j4j$1@newscl01ah.mathworks.com>
References: <iv7oaq$d0r$1@newscl01ah.mathworks.com> <iv7oth$eem$1@newscl01ah.mathworks.com>
Reply-To: "Twilighter " <mscmatlab@gmail.com>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1310158569 19603 172.30.248.48 (8 Jul 2011 20:56:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 8 Jul 2011 20:56:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2591832
Xref: news.mathworks.com comp.soft-sys.matlab:735601

thank you :)

"Roger Stafford" wrote in message <iv7oth$eem$1@newscl01ah.mathworks.com>...
> "Twilighter " <mscmatlab@gmail.com> wrote in message <iv7oaq$d0r$1@newscl01ah.mathworks.com>...
> > i have a matrix like
> > 
> > X = ones(9,500);
> > 
> > i need to this operation
> > 
> > rows 1,3,7,9 i need to divide them by 0.5
> > 
> > row 5 will be the same no change
> > 
> > row 2,4,6,8 i need to divide them by 0.2
> > 
> > how can i do this in expression?
> - - - - - - - - - - -
>  Y = bsxfun(@rdivide,X,[.5;.2;.5;.2;1;.2;.5;.2;.5]);
> 
> Roger Stafford