summaryrefslogtreecommitdiff
path: root/842/CH1/EX0.15/Example0_15.sce
blob: 4d018c34e0f713f9f0eafd68f25f48e1bdf4e6c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//clear//
//Example 1.5:To express sum of two complex exponentials
//as a single sinusoid
clear;
clc;
close;
t =0:1/100:2*%pi;
x1 = exp(sqrt(-1)*2*t);
x2 = exp(sqrt(-1)*3*t);
x = x1+x2;
for i = 1:length(x)
  X(i) = sqrt((real(x(i)).^2)+(imag(x(i)).^2));
end
plot(t,X);
xtitle('Full wave rectified sinusoid','time t','Magnitude');