Path: news.mathworks.com!not-for-mail
From: "jay singh" <drj_86@rediffmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Using Repmat for a periodic function
Date: Sun, 7 Dec 2008 06:25:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <ghfq7v$ckb$1@fred.mathworks.com>
References: <ghchbn$pp$1@fred.mathworks.com> <ghcm5e$87n$1@fred.mathworks.com>
Reply-To: "jay singh" <drj_86@rediffmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228631103 12939 172.30.248.37 (7 Dec 2008 06:25:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 7 Dec 2008 06:25:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1631028
Xref: news.mathworks.com comp.soft-sys.matlab:505436


Thanks alot Ryan..that worked perfectly!

"Ryan Ollos" <ryano@physiosonics.com> wrote in message <ghcm5e$87n$1@fred.mathworks.com>...
> "jay singh" <drj_86@rediffmail.com> wrote in message <
> > x2(t)={ 1      0<=t<=5e-4
> >             0     5e-4<t<=0.004
> 
> You have your sampled function, and you just need to replicate it, right?
> 
> Ts = 1e-4;
> t1 = 0:Ts:5e-4;
> t2 = 5e-4:Ts:40e-4;
> x2 = [ones(length(t1), 1); zeros(length(t2), 1)]; %periodic portion of signal
> 
> % replicate it n times
> n = 25;
> x2p = repmat(x2, n, 1);