Here is the album cover for my latest mix, including artists and song titles.
So, in my ECE 340 course, we have to do MATLAB programs for our homeworks. I figure, until I have something more interesting, I'll post an example of that.
% ECE 340 Homework 02
% 1-4
% Part a) cosine burst of frequency 2 Hz for 5 seconds
t = 0:0.01:5;
A = cos(4*pi*t);
% Part b) sine burst of frequency 2Hz for 5 seconds
B = sin(4*pi*t);
% Part c) sine burst of frequency 2Hz for 5 seconds, with pi/4 phase shift
C = (2^(1/2)/2)*(B - A);
subplot(2,2,1), plot(t,A)
title('cos(4*pi*t)')
xlabel('t')
ylabel('A(t)')
subplot(2,2,2), plot(t,B)
title('sin(4*pi*t)')
xlabel('t')
ylabel('B(t)')
subplot(2,2,3), plot(t,C)
title('sin(4*pi*t + pi/4)')
xlabel('t')
ylabel('C(t)')
print -dpng HW_02