Вы находитесь на странице: 1из 10

>> x=linspace(0,4*pi,60)

x=

Columns 1 through 12

0 0.2130 0.4260 0.6390 0.8520 1.0649 1.2779 1.4909 1.7039 1.9169


2.1299 2.3429

Columns 13 through 24

2.5559 2.7689 2.9819 3.1948 3.4078 3.6208 3.8338 4.0468 4.2598 4.4728
4.6858 4.8988

Columns 25 through 36

5.1117 5.3247 5.5377 5.7507 5.9637 6.1767 6.3897 6.6027 6.8157 7.0286
7.2416 7.4546

Columns 37 through 48

7.6676 7.8806 8.0936 8.3066 8.5196 8.7326 8.9456 9.1585 9.3715 9.5845
9.7975 10.0105

Columns 49 through 60

10.2235 10.4365 10.6495 10.8625 11.0754 11.2884 11.5014 11.7144 11.9274


12.1404 12.3534 12.5664

>> y=sin(x)

y=
Columns 1 through 12

0 0.2114 0.4132 0.5964 0.7526 0.8748 0.9574 0.9968 0.9912 0.9407


0.8477 0.7165

Columns 13 through 24

0.5528 0.3642 0.1591 -0.0532 -0.2631 -0.4611 -0.6382 -0.7866 -0.8993 -0.9714 -
0.9996 -0.9827

Columns 25 through 36

-0.9213 -0.8183 -0.6783 -0.5077 -0.3141 -0.1063 0.1063 0.3141 0.5077 0.6783
0.8183 0.9213

Columns 37 through 48

0.9827 0.9996 0.9714 0.8993 0.7866 0.6382 0.4611 0.2631 0.0532 -0.1591 -
0.3642 -0.5528

Columns 49 through 60

-0.7165 -0.8477 -0.9407 -0.9912 -0.9968 -0.9574 -0.8748 -0.7526 -0.5964 -0.4132
-0.2114 -0.0000
>> z=cos(x)

z=

Columns 1 through 12

1.0000 0.9774 0.9106 0.8027 0.6585 0.4846 0.2887 0.0798 -0.1327 -0.3392 -
0.5304 -0.6976

Columns 13 through 24

-0.8333 -0.9313 -0.9873 -0.9986 -0.9648 -0.8874 -0.7698 -0.6175 -0.4373 -0.2373
-0.0266 0.1853

Columns 25 through 36
0.3888 0.5748 0.7348 0.8616 0.9494 0.9943 0.9943 0.9494 0.8616 0.7348
0.5748 0.3888

Columns 37 through 48

0.1853 -0.0266 -0.2373 -0.4373 -0.6175 -0.7698 -0.8874 -0.9648 -0.9986 -0.9873 -
0.9313 -0.8333

Columns 49 through 60

-0.6976 -0.5304 -0.3392 -0.1327 0.0798 0.2887 0.4846 0.6585 0.8027 0.9106
0.9774 1.0000
>> x=linspace(0,16,100);

>> y=sin(x);

>> z=(y>=0).*y;

>> z=z+0.5*(y<0);

>> z=(x<=14).*z;

>> plot(x,z)

>> xlabel('x'), ylabel('z=f(x)'), title('Señal discontinua')


>> x=linspace(0,6*pi,60);

>> y=sin(x);

>> z=cos(x);

>> plot(x,y)

>> hold on

>> plot(x,z,'m')

>> hold off


>> x=linspace(0,4*pi,60);

>> y=sin(x);

>> z=cos(x);

>> a=2*sin(x).*cos(x);

>> b=sin(x)./(cos(x)+eps);

>> subplot(2,2,1)

>> plot(x,y),axis([0 4*pi -1 1]), title('sin(x)')

>> subplot(2,2,2)

>> plot(x,z),axis([0 4*pi -1 1]), title('cos(x)')

>> subplot(2,2,3)

>> plot(x,a),axis([0 4*pi -1 1]), title('2sin(x)cos(x)')

>> subplot(2,2,4)

>> plot(x,b),axis([0 4*pi -40 40]), title('tg=sin(x)/cos(x)')

Вам также может понравиться