Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1008.01 KB, 13 trang )
<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">
Hà Nội, 01/2024
</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3">for i = 1: n
if t(i) >= -ay(i)= 1;
function y = us(x)y = (sign(x) + 1)/2 ;Nên lưu file có tên là”us.m”
end
</div><span class="text_page_counter">Trang 4</span><div class="page_container" data-page="4">function y=uramp(t,b)N=length(t);y=zeros(1,N);
for i=1:N
if t(i)>=-by(i)=(t(i)+b);
>> y1=5.*u(t-2);>> plot(t,y1)
>> y2=3.*r(t+5);
</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5">>> plot(t,y2)
>> y3=2*r(t+2.5)-5*r(t)+3*r(t-2)+u(t-4);>> plot(t,y3)
>> y4=sin(t).*(u(t+3)-u(t-3));
</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6">>> plot(t,y4)
Đồ thị 1>> t=-10:10;
>> y1= 0.5*r(-abs(t)+4);>> plot(t,y1);
>> axis([-10 10 -0.5 2]); grid on;
</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7">Đồ thị 2>> t=-10:0.001:10;
>> y2=0.5*r(-abs(t)+4)-u(abs(t)-8)+1;>> plot(t,y2)
y (t )=2 r (t+2.5 5 r(t 3 r(t−2 u(t−4)− )+ )+ )
</div><span class="text_page_counter">Trang 8</span><div class="page_container" data-page="8">>> t=-10:0.001:10;
>> y=2*r(t+2.5)-5*r(t)+3*r(t-2)+u(t-4);>> [ye,yo]=evenodd(y);
>> plot(t,y)>> hold on>> plot(t,ye,'m')>> plot(t,yo,'r')>> legend('y','ye','yo')
>> w=pi/10;
>> x1=1+1.5*cos(2*pi*w*t)-0.6*cos(4*w*t);>> ezplot(x1,[-10;10])
>> grid on
</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">x<small>1 a</small>(t)=1.5 cos (2 π Ω<small>0</small>t
10π<sup>(s)</sup>x<small>1 b</small>(t)=−0.6 cos(4 Ω<small>0</small>t)
4 Ω<sub>0</sub><sup>=5 (s)</sup>T<sub>1 a</sub>
T<small>1 b</small>
π
>> w=pi/10;
>> x2=1+1.5*cos(6*pi*t)-0.6*cos(4*w*t);>> ezplot(x2,[-10;10])
</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10">>> grid on
x<small>2 a</small>(t)=1.5 cos (6 πt)
13<sup>(s)</sup>x<small>2 b</small>(t)=−0.6 cos(4 Ω<small>0</small>t)
4 Ω<sub>0</sub><sup>=5 (s )</sup>T<sub>2 a</sub>
T<small>2 b</small>
15
2
E=
<small>T / 2</small>
dt
<small>−T / 2T /2</small>
</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">>> x(t) = exp(-t).*cos(2*pi*t).*u(t);>> f = (abs(x(t))).^2;
>> E = int(f, t, -T/2, T/2)E =
(exp(-20)*(2*pi^2 + 1)*(exp(20) - 1))/(2*(4*pi^2 + 1))>> double(E)
ans = 0.2562
>> P = int(f, t, -T/2, T/2)/TP =
(exp(-20)*(2*pi^2 + 1)*(exp(20) - 1))/(40*(4*pi^2 + 1))>> double(P)
ans = 0.0128
>> syms t>> x(t)=exp(-abs(t));>> ezplot(x(t),[-10;10])>> hold on; grid on;>> ezplot(x(t-2),[-10;10])>> ezplot(x(t+2),[-10;10])>> legend('x(t)','x(t-2)','x(t+2)')
</div><span class="text_page_counter">Trang 12</span><div class="page_container" data-page="12">>> syms t>> x(t)=exp(-abs(t));>> ezplot(x(t),[-10;10])>> hold on; grid on;>> ezplot(x(2*t),[-10;10])>> ezplot(x(0.5*t),[-10;10])>> legend('x(t)','x(2t)','x(0.5t)')
</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13">>> syms t>> x(t)=exp(-abs(t));>> ezplot(x(t),[-10;10])>> hold on; grid on;>> ezplot(x(-t),[-10;10])
</div>