Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

function [x1,x2,x]=mocanu2a(t);

x1=2.8*sin(2.8*t+0);
x2=1.2*sin(2.0*t+1);
x=x1+x2;
figure(1)
plot(t,x1,t,x2,t,x)
grid on
xlabel ('Timpul')
ylabel ('x1,x2,x')
title ('compunerea ecuatiilor necoerente armonice')
legend('x1','x2','x')

>> t=0:0.005:2*pi;

>> mocanu2a(t);

>> t=0:0.005:2*pi;

>> mocanu2a(t);

function [x1,x2,x]=mocanu2b(t);
x1=2.8*sin(2.8*t+0);
x2=1.2*sin(2.8*t+1);
x=x1+x2;
figure(1)
plot(t,x1,t,x2,t,x)
grid on
xlabel ('Timpul')
ylabel ('x1,x2,x')
title ('compunerea ecuatiilor coerente armonice')
legend('x1','x2','x')
function [x1,x2,x]=mocanu2c(n,alpha);
t=0:0.005:2*pi;
x1=2.8*sin(2.8*t+0);
x2=1.2*sin(2.8*t+alpha);
x=x1+x2;
figure(1)
subplot(3,3,n)
plot(t,x1,t,x2,t,x)
grid on
xlabel('Timpul')
ylabel ('x1,x2,x')
title ('alpha=')

>> mocanu2c(4,pi/3);

>> mocanu2c(5,pi/2);

>> mocanu2c(6,2*pi/3);

>> mocanu2c(7,3*pi/4);

>> mocanu2c(8,5*pi/6);

>> mocanu2c(9,pi);

>> t=0:0.005:5*pi;

>> mocanu2a(t);

>> t=0:0.005:2*pi;
>> mocanu2a(t);

>> mocanu2a(t);

>> t=0:0.005:2*pi;

>> mocanu2a(t);

>> t=0:0.005:2*pi;

>> mocanu2b(t);

??? Undefined command/function 'mocanu2b'.

>> t=0:0.005:2*pi;

>> mocanu2b(t);

>> mocanu2c(1,0)

You might also like