Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!w24g2000prd.googlegroups.com!not-for-mail
From: fas <faisalmufti@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Sort and revert
Date: Wed, 12 Nov 2008 22:46:35 -0800 (PST)
Organization: http://groups.google.com
Lines: 22
Message-ID: <4e93831f-2efd-44c2-bac6-766e0c616dfd@w24g2000prd.googlegroups.com>
References: <195e56e8-c7b9-49b3-839f-fd0468067e86@35g2000pry.googlegroups.com> 
	<gfghmu$bpo$1@fred.mathworks.com>
NNTP-Posting-Host: 150.203.45.195
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1226558795 16246 127.0.0.1 (13 Nov 2008 06:46:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 13 Nov 2008 06:46:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w24g2000prd.googlegroups.com; posting-host=150.203.45.195; 
	posting-account=GPH0AgoAAAAxfbd_rNaAdoRNt4LD8YmY
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.0.4) 
	Gecko/2008102920 Firefox/3.0.4,gzip(gfe),gzip(gfe)
Bytes: 2018
Xref: news.mathworks.com comp.soft-sys.matlab:500565

On Nov 13, 5:33=A0pm, "Ning" <ning.ro...@gmail.com> wrote:
> fas <faisalmu...@gmail.com> wrote in message <195e56e8-c7b9-49b3-839f-fd0=
468067...@35g2000pry.googlegroups.com>...
> > Hi,
> > I have a vector which I have sorted B=3Dsort(A); Now after changing the
> > 10 values on either end I would like to take the vector back to A.
> > B=3Dsort(A);
> > B(1:10)=3D20;
> > B(90:100)=3D70;
> > Now I want to transform B->A so that the indexing is same of what my A
> > was.
>
> > Since its an image I have to revert back to same indexing of vector
> > only with changed values that I did after sorting.
>
> > Any idea ?
>
> That's easy. Try help sub2ind first, after you sorted and changed the vec=
tor, try help ind2sub.
> May it helps.

Sorry I could not work sub2ind for my case :(