Phasor addition on Matlab x1 t 5cos2pi 100t pi3 x2 t 4co
Phasor addition on Matlab.
x1 (t) = 5cos(2pi * 100t + pi/3)
x2 (t) = 4cos(2pi * 100t - pi/4)
What is the Matlab code?
Solution
>> t=linspace(0,1,1000);
 >> x1=5*sin(2*pi*100*t+pi/3);
 >> x2=4*sin(2*pi*100*t-*pi/4);
 >> f1=x1;
 >> f2=x2;
 >> x3=@(x)(f1(t) + f2(t));
 >> plot(t,x3)

