Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!flph199.ffdc.sbc.com!prodigy.com!flpi107.ffdc.sbc.com!flpi146.ffdc.sbc.com.POSTED!ffbda4aa!not-for-mail
Reply-To: "Nasser Abbasi" <nma@12000.org>
From: "Nasser Abbasi" <nma@12000.org>
Newsgroups: comp.soft-sys.matlab
References: <x19pl.11410$pr6.2838@flpi149.ffdc.sbc.com> <20631464.1235627813488.JavaMail.jakarta@nitrogen.mathforum.org>
Subject: Re: shifting row  in large matrix
Lines: 58
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
X-RFC2646: Format=Flowed; Original
Message-ID: <iaspl.13680$D32.7291@flpi146.ffdc.sbc.com>
NNTP-Posting-Host: 75.38.108.121
X-Complaints-To: abuse@prodigy.net
X-Trace: flpi146.ffdc.sbc.com 1235635982 ST000 75.38.108.121 (Thu, 26 Feb 2009 03:13:02 EST)
NNTP-Posting-Date: Thu, 26 Feb 2009 03:13:02 EST
Organization: at&t http://my.att.net/
X-UserInfo1: OXZUSWKOG@C_GFLYZBNXKQ@@AZJTB_LILIXNMVMHQYUJUZ]CCVWCPG[YMDXZH^[K[FFQZHBM@FX\NJOCW^TGNQLFRFU_HSDIHX[FCUWCXLP@PBL\BKFXXVGCM\CCKFVL_T[GJLBM@Q^]WKGS]T]M^NG_YKYVGV_IJYXS@MCBT[@JPRXECDFZMSXG]NVQQTJL
Date: Thu, 26 Feb 2009 00:18:42 -0800
Xref: news.mathworks.com comp.soft-sys.matlab:520944


"mahmud" <mahmusyubli@gmail.com> wrote in message 
news:20631464.1235627813488.JavaMail.jakarta@nitrogen.mathforum.org...
> again, tq very much, those are very helpful, but if i have
>
> 1     2     3     4     5     6     7     8     9     0
> 0     1     1     1     1     1     0     0     0     0
> 0     1     2     3     4     5     6     7     8     9
>
> becomes
>
> 1     2     3     4     5     6     7     8     9     0
> 0     1     1     0     1     1     1     0     0     0
> 0     1     2     3     4     5     6     7     8     9
> then
>
> 1     2     3     4     5     6     7     8     9     0
> 0     1     1     0     0     1     1     1     0     0
> 0     1     2     3     4     5     6     7     8     9
>
> partial of row 2 i want it moves, can you guys give me more MATLAB trick 
> about this?


A=[ 1 2 3 4 5 6 7 8 9 0;
       0 1 1 1 1 1 0 0 0 0;
       0 1 2 3 4 5 6 7 8 9]

A(2,4:end)=circshift(A(2,4:end),[1 1])
A(2,4:end)=circshift(A(2,4:end),[1 1])

--- output

A =

     1     2     3     4     5     6     7     8     9     0
     0     1     1     1     1     1     0     0     0     0
     0     1     2     3     4     5     6     7     8     9


A =

     1     2     3     4     5     6     7     8     9     0
     0     1     1     0     1     1     1     0     0     0
     0     1     2     3     4     5     6     7     8     9


A =

     1     2     3     4     5     6     7     8     9     0
     0     1     1     0     0     1     1     1     0     0
     0     1     2     3     4     5     6     7     8     9

EDU>>

--Nasser