Sunteți pe pagina 1din 2

Tema 2: Reprezentare grafica

MatLab
1. A elongatiilor intr-o coarda vibranta.

A=1;%m
lambda=0.5;%m
k=3*pi/lambda;%1/m
x=[0:0.1:pi+0.1]/k;
cv1=A*sin(k*x);
cv2=A*sin(2*k*x);
cv3=A*sin(3*k*x);
figure,plot(x,cv1,'k',x,cv2,'k*
',x,cv3,'o'),xlabel('lungime
(m)')

A=3;%m
lambda=0.9;%m
k=3*pi/lambda;%1/m
x=[0:0.1:pi+0.1]/k;
cv1=A*sin(k*x);
cv2=A*sin(2*k*x);
cv3=A*sin(3*k*x);
figure,plot(x,cv1,'k',x,cv2,'k*
',x,cv3,'o'),xlabel('lungime
(m)')

2. A elongatiilor intr-un tub sonor deschis.

A=1;%m
lambda=0.5;%m
k=2*pi/lambda;%1/m
x=[0:0.1:pi+0.1]/k;
tsd1=A*cos(k*x);
tsd2=A*cos(2*k*x);
tsd3=A*cos(3*k*x);
figure,plot(x,tsd1,'k',x,tsd2,'k*
',x,tsd3,'ko'),xlabel('lungime
(m)')

A=4;%m
lambda=0.2;%m
k=2*pi/lambda;%1/m
x=[0:0.1:pi+0.1]/k;
tsd1=A*cos(k*x);
tsd2=A*cos(2*k*x);
tsd3=A*cos(3*k*x);
figure,plot(x,tsd1,'k',x,tsd2,'k*
',x,tsd3,'ko'),xlabel('lungime
(m)')

A=2;%m
lambda=1;%m
k=2*pi/lambda;%1/m
x=[0:0.1:pi+0.1]/k;
tsd1=A*cos(k*x);
tsd2=A*cos(2*k*x);
tsd3=A*cos(3*k*x);
figure,plot(x,tsd1,'k',x,tsd2,'k*
',x,tsd3,'ko'),xlabel('lungime
(m)')