Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!feeder2.ecngs.de!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.eclipse.net.uk!news.eclipse.net.uk.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 07 Apr 2011 05:26:41 -0500
Date: Thu, 07 Apr 2011 11:27:02 +0100
From: Jamie Barron <mail@cmbuild.co.uk>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: Re: Upsampling by duplicating existing data?
References: <N-GdnSuvcZgjGgDQnZ2dnUVZ7sGdnZ2d@eclipse.net.uk> <ink2lk$gn0$1@fred.mathworks.com>
In-Reply-To: <ink2lk$gn0$1@fred.mathworks.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <HYadnc0PAOr8DADQnZ2dnUVZ7tWdnZ2d@eclipse.net.uk>
Lines: 19
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 178.78.75.150
X-Trace: sv3-yVhuYHVu+kf06u3xCwKSQH9KZcWao4VY7Re/7HbuBaBz9UL8nBUk8bb+O6Xyma45PMmo2xpdQyublxS!uSdr8gKImiv0hzSLXj9UipGFHGU59rV3f/Mc7//mtlnQDx653am9LrBXRamb1H55ajk8/hiOpu8b!us82bJz5IohjuZkQCTVu
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1557
Xref: news.mathworks.com comp.soft-sys.matlab:720565

On 07/04/2011 11:12, Sadik wrote:
> Hi Jamie,
>
> initial = [1;2;3];
> upsamplingFactor = 2;
>
> wanted = repmat(initial',[upsamplingFactor 1]);
> wanted = wanted(:);
>
> Best.

Hi Sadik,

That seems to work, thanks!

Can I ask what the "wanted = wanted(:);" line does please? It seems to 
be sorting it, but I don't know why.

Thanks.