logo

GNU octave code:.

   

Added on  2022-10-12

2 Pages172 Words1 Views
 | 
 | 
 | 
GNU octave code:
%%Initializing parameters
t = 0:0.1:50; % time t in seconds
A = 1; % amplitude is unity
f1 = 2; % f1 is 2 Hz
f2 = 2*f1; % f2 = 2f1
y1 = A*sin(2*pi*f1*t);
y2 = A*sin(2*pi*f2*t);
figure('Name','Name = Baljeet Singh, SID = 11673356','NumberTitle','off');
subplot(2,1,1)
plot(t,y1,'r-')
zoom(2)
xlabel('Time(sec)')
ylabel('Amplitude')
title('Signal y1')
subplot(2,1,2)
plot(t,y2,'b-')
zoom(2)
xlabel('Time(sec)')
ylabel('Amplitude')
title('Signal y2')
Output:
GNU octave code:._1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents