Wednesday, February 8, 2017

EE410: Signals and System: review

Prove Angle Sum trig identity:
http://mathonweb.com/help_ebook/html/trigids.htm
How to graph sin and cos
https://www.mathworks.com/examples/matlab/mw/graphics-ex79905890-add-title-axis-labels-and-legend-to-graph#1

y = linspace(a,b) generates a row vector y of 100 points linearly spaced between and including a and b.
y = linspace(a,b,n) generates a row vector y of n points linearly spaced between and including a and b.
x = linspace(-2*pi , 2*pi , 100);

x = linspace(-2*pi,2*pi,500); % create line space from -2pi to 2pi in 500 points
y1 = sin(x);
y2 = 3*(cos(0.8*pi*x)).^2; % remember put a dot before power.
y3 = cos(x);
y4 = (cos(x)).^2;
plot(x,y3,x,y4,x,y1,x,y2),grid; % grid as its name