Professional Documents
Culture Documents
Muthia Az-Zahra - Laporan P.Sinyal
Muthia Az-Zahra - Laporan P.Sinyal
Muthia Az-Zahra - Laporan P.Sinyal
TEKNIK ELEKTRONIKA
POLITEKNIK NEGERI SRIWIJAYA
TAHUN AJARAN 2020/2021
1. 2D PLOTTING (12 Oktober, 2020)
t=[0:0.01:2];
subplot(311);
plot(t,1.5*sin(2*%pi*1*t))
subplot(312);
plot(t,0.5*sin(2*%pi*4*t))
subplot(313)
plot(t,1.5*sin(2*%pi*1*t))+(t,0.5*sin(2*%pi*4*t))
5. DOT ANALOG SIGNAL (9 November, 2020)
t5=-0:10; xlabel("Index","fontsize",2,"color","green");
x5=exp(t5); ylabel("Amplitude","fontsize",2,"color","gre
//scf(); en");
subplot(235)
plot(t5,x5,'black','marker','d','markerfac','blac t=[0:0.01:2];
k','markeredg','cyan'); subplot(231);
title('Exponential plot(t,0.5*sin(2*%pi*4*t),'r')
Wave','color','cyan','fontsize',4); xlabel("Time");
xlabel("Index","fontsize",2,"color","cyan"); ylabel("Amplitude");
ylabel("Amplitude","fontsize",2,"color","cya xtitle("Analog Signal");
n");
x6=rand(1,100) t=[0:0.01:2];
//scf(); subplot(234);
subplot(236) plot2d3(t,sin(2*%pi*4*t),'r')
plot(1:length(x6),x6,'black','marker','d','mark xlabel("Time");
erfac','green','markeredg','red'); ylabel("Amplitude");
title('Exponential xtitle("Sampled Signal");
Wave','color','green','fontsize',4);
6. SAMPLE DIGITAL SIGNAL (16 November, 2020)
t=[0:0.01:2]; xlabel("Time");
subplot(421); ylabel("Amplitude");
plot(t,1.5*cos(2*%pi*1*t)) xtitle("Sampled Signal");
xlabel("Time");
ylabel("Amplitude"); t=[0:0.01:2];
xtitle("Continuous Signal"); subplot(426)
plot(t,2.5*sin(2*%pi*2*t))
t=[0:0.01:2]; xlabel("Time");
subplot(423); ylabel("Amplitude");
plot2d3(t,1.5*sin(2*%pi*1*t)) xtitle("Continuous Signal");
xlabel("Time");
ylabel("Amplitude"); t=[0:0.01:2];
xtitle("Sampled Signal"); subplot(428)
plot2d3(t,2.5*sin(2*%pi*2*t))
t=[0:0.01:2]; xlabel("Time");
subplot(422); ylabel("Amplitude");
plot(t,0.5*sin(2*%pi*4*t)) xtitle("Sampled Signal");
xlabel("Time"); t=[0:0.01:2];
ylabel("Amplitude"); subplot(427)
xtitle("Continuous Signal"); plot2d3(t,(1.5*sin(2*%pi*1*t)) + (0.5*sin(2*
%pi*4*t)));
t=[0:0.01:2]; xlabel("Time");
subplot(424); ylabel("Amplitude");
plot2d3(t,0.5*sin(2*%pi*4*t)) xtitle("Sampled Signal");
xlabel("Time");
ylabel("Amplitude"); t=[0:0.01:2];
xtitle("Sampled Signal"); subplot(426)
plot(t,2.5*sin(2*%pi*2*t))
t=[0:0.01:2]; xlabel("Time");
subplot(425) ylabel("Amplitude");
plot(t,(1.5*sin(2*%pi*1*t)) + (0.5*sin(2* xtitle("Continuous Signal");
%pi*4*t)));
xlabel("Time"); t=[0:0.01:2];
ylabel("Amplitude"); subplot(428)
xtitle("Continuous Signal"); plot2d3(t,2.5*sin(2*%pi*2*t))
xlabel("Time");
t=[0:0.01:2]; ylabel("Amplitude");
subplot(427) xtitle("Sampled Signal");
plot2d3(t,(1.5*sin(2*%pi*1*t)) + (0.5*sin(2*
%pi*4*t)));
7. DIGITAL AND ANALOG SIGNAL (23 November, 2020)
t=[0:0.01:2]; t=[0:0.01:2];
subplot(234); subplot(233);
plot2d3(t,0.5*sin(2* plot(t,(0.5*sin(2*%pi*4*t)) + (2*sin(3*
%pi*4*t),style=color("red")) %pi*1*t)));
xlabel("Time"); xlabel("Time");
ylabel("Amplitude"); ylabel("Amplitude");
xtitle("Digital Signal"); xtitle("Analog Signal");
t=[0:0.01:2]; t=[0:0.01:2];
subplot(232); subplot(236);
plot(t,2*sin(3*%pi*1*t),'g') plot2d3(t,(0.5*sin(2*%pi*4*t)) + (2*sin(3*
xlabel("Time"); %pi*1*t)),style=color("blue"));
ylabel("Amplitude"); xlabel("Time");
xtitle("Analog Signal"); ylabel("Amplitude");
xtitle("Analog Signal");
t=[0:0.01:2];
9. DIGITAL AND SIGNAL CONVOLUTION (7 Desember,
2020)
t=[0:0.2:2*%pi]; title('Sequence 2','color','yellow','fontsize',4);
f1=0.5*sin(2*%pi*4*t); xlabel("Index","Fontsize",2,"color","blue",'p
f2=2*sin(3*%pi*1*t) osition',[0.6 0.3]);
y=convol(f1,f2); ylabel("Amplitude","Fontsize",2,"color","bl
subplot(3,1,1); ue");
bar(f1,0.1,'red'); subplot(3,1,3);
title('Sequence 1','color','red','fontsize',4); bar(y,0.1,'green');
xlabel("Index","Fontsize",2,"color","blue",'p title('Convoled
osition',[0.6 0.3]); Sequence','color','green','fontsize',4);
ylabel("Amplitude","Fontsize",2,"color","bl xlabel("Index","Fontsize",2,"color","blue",'p
ue"); osition',[0.6 0.3]);
subplot(3,1,2); ylabel("Amplitude","Fontsize",2,"color","bl
bar(f2,0.1,'yellow'); ue");
10. AUDIO SIGNAL (14 Desember, 2020)
[y,Fs,bits]=wavread("C:\Users\USER\Desktop\Horse");Fs,bits
sound(y,Fs);
subplot(3,1,1)
plot2d(y(1,:))//first channel
z=y(:,$:-1:1);
subplot(3,1,2)
plot2d(z(2,:))//first channel
11. RESERVED AUDIO SIGNAL (21 Desember, 2020)
[y,Fs,bits]=wavread("C:\Users\USER\Desktop\Bass");Fs,bits
sound(y,Fs);
subplot(3,1,1)
plot2d(y(1,:))//first channel
z=y(:,$:-1:1);
subplot(3,1,2)
plot2d(z(2,:))//first channel
12. SHORT TIME ENERGY AUDIO SIGNAL
(28 Desember, 2020)
[y,Fs,bits]=wavread("C:\Users\USER\Deskt En ( j) =0;
op\Bass");Fs,bits if frame_end >= length (y ) then
t =(0:length(y)-1)/Fs; t h e l a s t segmen t
subplot(311) frame_end = length ( y )
plot(t,y) frame_len = frame_end - frame_start ;
xlabel(’Time i n s e c o n d s ’ ) end
title (’ O r i g i n a l s i g n a l ’ ) segment = y ( frame_start : frame_end ) ;
frame_durn = 0.02; for k =1: frame_len
frame_len = Fs * frame_durn ; 34 En ( j) = En ( j ) +( segment ( k ) *
Rect_window = window ( ’ r e ’ , frame_len Rect_window ( k ) ) ^2
); end
frame_shift = Fs * frame_durn /2; frame_start = frame_start + frame_shift ;
R e c t a n g ul a r window frame_end = frame_end + frame_shift ;
no_of_frames = floor ( length ( y ) / end
frame_shift ) ; subplot (312)
frame_start =1; plot ( En )
frame_end = frame_start + frame_len -1; title ( ’ S h o r t Time Enery u s i n g R e c t
for j =1: no_of_frames a n g ul a r window ’ )
xlabel ( ’ Segment number ’ )
ylabel ( ’STE ’ )