Path: news.mathworks.com!not-for-mail
From: "jay singh" <drj_86@rediffmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Using Repmat for a periodic function
Date: Sat, 6 Dec 2008 00:35:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <ghchbn$pp$1@fred.mathworks.com>
Reply-To: "jay singh" <drj_86@rediffmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228523704 825 172.30.248.35 (6 Dec 2008 00:35:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 6 Dec 2008 00:35:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1631028
Xref: news.mathworks.com comp.soft-sys.matlab:505316


Hey guys, i'm new to matlab so this might be a really easy one for you experts out there but here's the situation :

A1=[3.8469*10^6];
B1=[325.6907];
C1=A1;
Ts=1e-4; t=[0.0:Ts:0.1]; num1=[A1]; den1=[1 B1 C1];
sys1=tf(num1, den1); h1=impulse(sys1,t); 

x1=ones(5,1);
now with that being system, H1, we have to do the following:

Assume the input x2(t) to H1 is a periodic signal with the period T =
0:004. Over one period, say, from t = 0 to t = 0:004, the signal is denoted
as
x2(t)={ 1      0<=t<=5e-4
            0     5e-4<t<=0.004

Compute and plot the output y2(t) using MATLAB.
Hints: Create the input x2(t) and then use "y2=conv(x2, h1)*Ts".

now i'm having trouble getting my x2 function right and all i know is that x2 can be created pretty much in one line using the 'repmat' command but i'm not too sure of how the arguements would go...we have to plot this for 25 periods since T=0.004 and if u notice above, t goes upto 0.1s so that gives 25 periods.


this is the only part of the project that i'm stuck at and its due tomorrow. i'd really appreciate the help thanks