1. Trang chủ
  2. » Luận Văn - Báo Cáo

BÀI tập lập TRÌNH MATLAB vẽ đồ THỊ áp 3 PA HÌNH SIN CÙNG một cửa sổ với 3 ô đồ THỊ

9 305 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 9
Dung lượng 53 KB

Nội dung

BAØI TAÄP LAÄP TRÌNH MATLAPB Hoïc sinh : Kieàu Minh Tuaán Lôùp : 24DNT Ñeà baøi : Veõ ñoà thò aùp 3 pha hình sin cuøng moät cöûa soå vôùi 3 oâ ñoà thò. >> x=linspace(0,5*pi,500);% cho x chay tu o den 3pi voi 500 mau >> y1= 5*sin(x) y1 = Columns 1 through 11 0 0.1574 0.3146 1.3977 1.5481 0.4715 0.6279 0.7837 0.9388 1.0929 1.2459 Columns 12 through 22 1.6969 1.8441 2.9440 3.0698 1.9895 2.1329 2.2742 2.4132 2.5498 2.6839 2.8154 3.5411 3.6504 3.7562 3.8582 3.9564 4.0506 4.5289 4.5934 4.6533 4.7085 4.8051 4.9792 4.9911 4.9980 5.0000 Columns 23 through 33 3.1925 3.3120 4.1409 4.2270 3.4282 Columns 34 through 44 4.3090 4.3867 4.8462 4.8825 4.4600 4.7592 Columns 45 through 55 4.9140 4.9406 4.9762 4.9584 4.9624 Columns 56 through 66 4.9970 4.9891 4.9357 4.9081 4.8756 4.5155 4.4457 4.8383 4.7963 4.7494 4.6979 4.6417 4.5809 4.1232 4.0321 3.9370 3.8381 3.7353 3.6289 Columns 67 through 77 4.3715 4.2929 3.5188 3.4053 4.2101 Columns 78 through 88 3.2883 3.1682 2.1044 1.9606 3.0448 2.9185 2.7893 2.6573 2.5227 2.3856 2.2461 Columns 89 through 99 1.8148 1.6673 0.4401 0.2832 1.5181 1.3674 1.2154 1.0621 0.9078 0.7526 0.5967 Columns 100 through 110 0.1259 -0.0315 -0.1888 -0.3460 -0.5028 -0.6591 -0.8148 -0.9697 -1.1236 -1.2763 -1.4279 Columns 111 through 121 -1.5780 -1.7265 -1.8734 -2.0183 -2.1613 -2.3021 -2.4407 -2.5768 -2.7104 -2.8413 -2.9694 Columns 122 through 132 -3.0945 -3.2166 -3.3355 -3.4511 -3.5632 -3.6719 -3.7769 -3.8781 -3.9755 -4.0690 -4.1584 Columns 133 through 143 -4.2438 -4.3249 -4.4017 -4.4742 -4.5422 -4.6057 -4.6647 -4.7190 -4.7687 -4.8137 -4.8538 Columns 144 through 154 -4.8892 -4.9197 -4.9454 -4.9661 -4.9820 -4.9928 -4.9988 -4.9998 -4.9958 -4.9869 -4.9730 Columns 155 through 165 -4.9543 -4.9306 -4.9020 -4.8686 -4.8303 -4.7873 -4.7395 -4.6870 -4.6299 -4.5682 -4.5019 Columns 166 through 176 -4.4312 -4.3561 -4.2767 -4.1931 -4.1053 -4.0134 -3.9176 -3.8178 -3.7143 -3.6071 -3.4964 Columns 177 through 187 -3.3821 -3.2646 -3.1437 -3.0198 -2.8929 -2.7631 -2.6306 -2.4955 -2.3579 -2.2179 -2.0758 Columns 188 through 198 -1.9316 -1.7855 -1.6376 -1.4881 -1.3371 -1.1848 -1.0313 -0.8769 -0.7215 -0.5654 -0.4088 Columns 199 through 209 -0.2517 -0.0944 1.1542 1.3068 0.0630 0.2203 0.3774 0.5341 0.6903 0.8458 1.0005 1.9025 2.0471 2.1897 2.3300 2.4681 2.6038 3.3589 3.5853 3.7974 3.8979 Columns 210 through 220 1.4580 1.6078 2.7368 2.8672 1.7560 Columns 221 through 231 2.9947 3.1192 3.9945 4.0872 3.2407 Columns 232 through 242 3.4738 3.6932 4.1758 4.2603 4.7781 4.8221 4.3406 4.4165 4.4881 4.5553 4.6179 4.6759 4.7294 4.9499 4.9697 4.9845 4.9944 4.9994 4.9994 4.8957 4.8613 4.8221 4.7781 4.7294 4.6759 4.2603 4.1758 4.0872 3.1192 1.6078 Columns 243 through 253 4.8613 4.8957 4.9252 4.9944 4.9845 Columns 254 through 264 4.9697 4.9499 4.9252 4.6179 4.5553 Columns 265 through 275 4.4881 4.4165 3.6932 3.5853 4.3406 3.9945 3.8979 3.7974 2.9947 2.8672 2.7368 2.6038 2.4681 1.4580 1.1542 1.0005 0.8458 Columns 276 through 286 3.4738 3.3589 2.3300 2.1897 3.2407 Columns 287 through 297 2.0471 1.9025 0.6903 0.5341 1.7560 1.3068 Columns 298 through 308 0.3774 0.2203 -1.0313 -1.1848 0.0630 -0.0944 -0.2517 -0.4088 -0.5654 -0.7215 -0.8769 Columns 309 through 319 -1.3371 -1.4881 -1.6376 -1.7855 -1.9316 -2.0758 -2.2179 -2.3579 -2.4955 -2.6306 -2.7631 Columns 320 through 330 -2.8929 -3.0198 -3.1437 -3.2646 -3.3821 -3.4964 -3.6071 -3.7143 -3.8178 -3.9176 -4.0134 Columns 331 through 341 -4.1053 -4.1931 -4.2767 -4.3561 -4.4312 -4.5019 -4.5682 -4.6299 -4.6870 -4.7395 -4.7873 Columns 342 through 352 -4.8303 -4.8686 -4.9020 -4.9306 -4.9543 -4.9730 -4.9869 -4.9958 -4.9998 -4.9988 -4.9928 Columns 353 through 363 -4.9820 -4.9661 -4.9454 -4.9197 -4.8892 -4.8538 -4.8137 -4.7687 -4.7190 -4.6647 -4.6057 Columns 364 through 374 -4.5422 -4.4742 -4.4017 -4.3249 -4.2438 -4.1584 -4.0690 -3.9755 -3.8781 -3.7769 -3.6719 Columns 375 through 385 -3.5632 -3.4511 -3.3355 -3.2166 -3.0945 -2.9694 -2.8413 -2.7104 -2.5768 -2.4407 -2.3021 Columns 386 through 396 -2.1613 -2.0183 -1.8734 -1.7265 -1.5780 -1.4279 -1.2763 -1.1236 -0.9697 -0.8148 -0.6591 Columns 397 through 407 -0.5028 -0.3460 -0.1888 -0.0315 0.9078 1.0621 Columns 408 through 418 0.1259 0.2832 0.4401 0.5967 0.7526 1.2154 1.3674 2.5227 2.6573 1.5181 1.6673 1.8148 1.9606 2.1044 2.2461 2.3856 3.1682 3.2883 3.4053 3.5188 3.6289 3.7353 4.6417 Columns 419 through 429 2.7893 2.9185 3.8381 3.9370 3.0448 Columns 430 through 440 4.0321 4.1232 4.6979 4.7494 4.2101 4.2929 4.3715 4.4457 4.5155 4.5809 4.9081 4.9357 4.9584 4.9762 4.9891 4.9970 Columns 441 through 451 4.7963 4.8383 4.8756 5.0000 4.9980 Columns 452 through 462 4.9911 4.9792 4.9624 4.9406 4.7085 4.6533 4.9140 4.8825 4.8462 4.8051 4.7592 4.3867 4.3090 4.2270 4.1409 4.0506 3.9564 3.3120 3.1925 3.0698 2.9440 2.8154 2.6839 1.6969 1.3977 Columns 463 through 473 4.5934 4.5289 3.8582 3.7562 4.4600 Columns 474 through 484 3.6504 3.5411 2.5498 2.4132 3.4282 Columns 485 through 495 2.2742 2.1329 0.9388 0.7837 1.9895 1.8441 Columns 496 through 500 0.6279 0.4715 0.3146 0.1574 0.0000 1.5481 1.2459 1.0929 >> y2= 5*sin(x+3*pi/2); >> y3= 5*sin(x-3*pi/3); >> plot(x,y1,x,y2,x,y3); >> % set axis limits and grid lines >> grid on >> xlabel('Time') >> ylabel('Amplitude') >> legend('First','Second','Third') >> title('3 phase_sin plot') >> Baøi taäp 4a Vieát chöông trình nhaäp vaøo moät soá n(n>=0) vôùi caùc tröôøng hôïp sau: a) Neáu n0 vaø leõ thì tính toång s1=1+3+5+...+n,n laø soá leõ. c) Neáu n>0 vaø chaün thì s2=2+4+6+...+n,n chaün. d) Neáu n=0 döøng chöông trình laïi. Viet chuong trinh nhap vao mot so n(n>=0) % voi cac truong hop sau: % a) Neu n0 va le thi tinh tong s1=1+3+5+...+n,n la so le. % c) Neu n>0 va chan thi s2=2+4+6+...+n,n chan. % d) Neu n=0 dung chuong trinh lai. n=input('nhap n= '); %nhap so n du=rem(n,2); %kiem tra n la le hay chan %neu n le du=1, n chan du=0 if n0) & (du==1) %neu n>0 va le i=1; %gan i=1; s1=1; %gan tong s1=1 while i0) & (du==0) i=0; s2=0; while i ... -1. 931 6 -2.0758 -2.2179 -2 .35 79 -2.4955 -2. 630 6 -2.7 631 Columns 32 0 through 33 0 -2.8929 -3. 0198 -3. 1 437 -3. 2646 -3. 3821 -3. 4964 -3. 6071 -3. 71 43 -3. 8178 -3. 9176 -4.0 134 Columns 33 1 through 34 1... 1.66 73 1.8148 1.9606 2.1044 2.2461 2 .38 56 3. 1682 3. 28 83 3.40 53 3.5188 3. 6289 3. 735 3 4.6417 Columns 419 through 429 2.78 93 2.9185 3. 838 1 3. 937 0 3. 0448 Columns 430 through 440 4. 032 1 4.1 232 4.6979... -3. 9755 -3. 8781 -3. 7769 -3. 6719 Columns 37 5 through 38 5 -3. 5 632 -3. 4511 -3. 335 5 -3. 2166 -3. 0945 -2.9694 -2.84 13 -2.7104 -2.5768 -2.4407 -2 .30 21 Columns 38 6 through 39 6 -2.16 13 -2.01 83 -1.8 734 -1.7265

Ngày đăng: 18/10/2015, 21:20

TỪ KHÓA LIÊN QUAN

w