You are on page 1of 2

Deret Eksponensian Komponennya bilangan Riil

n=[0:10]; x=(0.9).^n
n=nilai , x=indeks
stem (n,x)

Complex Exponential Sequence


n=[0:100]; x=(0.9*exp(j*pi/10)).^n;
real(x)
imag(x);
stem(n,real(x))
figure;subplot(2,1,1);stem(n,real(x));subplot(2,1,2);stem(n,imag(x));
>> abs(x);angle(x);
>> figure;subplot(2,1,1);stem(n,abs(x));subplot(2,1,2);stem(n,angle(x));
>>
figure;subplot(4,2,1);stem(n,x);subplot(4,2,2);stem(n,real(x));subplot(4,2,3);stem(n,imag(x));subplot(4,2,
4);stem(n,angle(x));

Sinusidial Sequence
X=[n]=3cos(0,1pi n + pi/3) + 2sin (0,5pi)
>> n=[0:100];x=3*cos(0.1*pi*n+pi/3)+2*sin(0.5*pi*n);
>> figure;subplot(2,1,1);plot(n,x);subplot(2,1,2);stem(n,x)
>> n=[0:100];xx=3*cos(0.1*pi*n+pi/3)+2*sin(0.5*pi*n);
>> n=[0:100];x=3*cos(0.1*pi*n+pi/3);y=2*sin(0.5*pi*n);
>> figure;subplot(3,1,1);stem(n,x);subplot(3,1,2);stem(n,y);subplot(3,1,3);stem(n,xx)

Random Sequential
1. Random Uniform -> 0 s/d 1
2. Random Gaus -> -1 s/d 1, rata2 normal = 0, standar deviasi =1

a=rand(1,40); b=randn(1,40)
>> figure;subplot(2,1,1);stem(0:39,a);subplot(2,1,2);stem(0:39,b);

Periodic Sequence
>> x=[1,2,3,4,5]
>> xtildede=[x,x,x,x]
>> xtilde2=x'*ones(1,4);
>> xtilde2=xtilde2(:);//membuat barisan dalam satu kolom
>> xtilde2=xtilde2';

Signal Addition
Fungsi :
function [y,n]=sigadd(x1,n1,x2,n2);
n=min(min(n1),min(n2)):max(max(n1),max(n2));
y1=zeros(1,length(n));y2=y1;
y1(find((n>=min(n1))&(n<=max(n1))==1))=x1;
y2(find((n>=min(n2))&(n<=max(n2))==1))=x2;
y=y1+y2;
figure;subplot(3,1,1);stem(n,y1);subplot(3,1,2);stem(n,y2);subplot(3,1,3);ste
m(n,y);
x1=[3 4 5 6 7 8 9];
>> x2=[1 1 1 1 1 1 1 1];
>> n1=[-3:3];
>> n2=[-5:2];
>> sigadd(x1,n1,x2,n2)

You might also like