Cfiu 8: (0.25 diem) Trong ciia so command cua Matlab, chung ta thirc hien lenh sau: >> a=[1 2 3]; >> b = a'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' , >> a.*b Két qud in ra la: a.10 c. Cñu lenh bao lot Cñu 9: (0.25 diem) b.14 d. Tat ca deu sai. Trong ciia so Command cua Matlab, cho biét gia tr| cua x khi chung ta thee hien lenh sau: >> x = 0:2.5:8 a. 0 2.5 5.0 7.5 c. Cau lenh bao lot Cfiu 10: (0.25 diém) b. 0 2 4 8 d. Tat câ deu sai. Trong cira so command ciia Matlab, cho biét gia tri cua y khi chung ta there hien lenh sau: >> x = 0:2:6 >> y = 2*sin(x) a.Vecto 1 hing 3 cut c. Vecto 1 hang 1 cot Ciiu 11: (0.25 diem) b.Vecot I hung 4 cot d. Can lenh bao lot. Cho 2 vector x = [1 2 3) va y = [1 0 0], cau lenh nao sau day la SAI: a. pie(x)b. pie(x,y) c. pie(y,x)d. Khong ciu lenh mo SAI. Can 12: (0.25 diem) Cho vecto x cé gia tr| nhu sau: >> x = [l:5] De ve do th| sin2(x), cau lenh nao sau day la DQG: a.plot(sin(x)^2) c. fplot( ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''sin(x)^2'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ) Cau 13: (0.25 diém) b.plot( ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''sin(x)^2'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ) d. Tat ca déu sai. Trong cac cau lenh Matlab sau, can lenh nao la DQG: a. >> y — sym(x)b. >> y = syms(x) c. >> y = sym( ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''x'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' )d. >> y = syms( ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''x'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' )
T R U I N G K H D O H P H C O A B S I T O M K O H N A M K Y I C H E C O D I E T H T A N U A O T M T T P H A C M D Y M E T o n : t f D E C I N n n g i a n : p h e p A N A O H I O h n r v D u - t f c P U M s u K C Y T H R O O N C G K K Y I Y N T A H M U H A T O C - 2 F T F ] ^ p h u t d u n g t a i l i e u ( K H O N G s u d u n g l a p t o p ) : N o a b c d X N o a b c X 2 X X X X X X X X X X X X X X X X X X 1 X 1 X X X 3 X 4 X X X X M / Q T - P D B X X X B X X h i e u : X X X C L - R D T V d X S I T m T h e n D H X X /2 D D E P A N : N a o b c d X X X X N o X X a b 2 X X X X X X X X X 1 X 1 X X 3 X X X X X / Q T - P B B C L - R B T V X X X M X X B X X X h i e u : X X X d X X c X S A X X X /2 TRU'dNG BH SU' PHAM KY THUAT TPHCM DE THI CUOI KY HOC KY I NAM HOC 2019-2020 KHOA CO KHI CHE TAO MAY Mon: TIN HOC TRONG KY THUAT BO MON CODIENTU' M3 mnn hnc MF.TF1,14529 Chu’ky giam thi Chu ky giam thi Be so/Ma dl: 01 Be thi co 08 trang Thai gian: 70 phut CB cham thi thu nhat CB cham thi thu hai So cau dung: So cau dung: Diem va chir ky Dilm va ch& ky Dirac phep su dung tai lieu (KHONG su dung laptop) Ho va ten: M as6SV : So TT: .Phong thi: PHIEU TRA LOfI Hiro'ng dSn tra 161 cau hoi: Chon cau tra lai dung: No a b Bo chon: c d Chon lai: No 21 22 23 24 25 26 27 28 29 10 30 11 31 12 32 13 33 14 34 15 35 16 36 17 37 18 38 19 39 20 40 S6 hieu: BM2/QT-PBBCL-RBTV a b c d 1/2 PHANI-M ATLAB (15 cau) Cau 1: (0.25 diim) Trong cac cau lenh Matlab sau, cau lenh nao la DUNG: a x_5 = b _x5 = c 5_x = d Tat ca deu dung Cau 2: (0.25 diem) Cho biet ket qua cua phep toan sau » /0 a b Inf c NaN d Tat ca deu sai Cau 3: (0.25 diem) Lenh close all Matlab co chuc nang: a Dong toan bo cua so lam viec b Thoat Matlab c Dong toan bo cua so hoa (Figure) d Tdt ca deu sai Cau 4: (0.25 diem) Trong cua so Command cua Matlab, chung ta thuc hien lenh sau: » 2*3A2 Ket qua la: a 16 b 18 c Cau lenh bao loi d Tat ca deu sai Cau 5: (0.25 diem) Trong cua s6 Command cua Matlab, chung ta thuc hien lenh sau: » abs(3+4j) Ket qua la: a b c Cau lenh bao 16i d Tdt ca deu sai Cau 6: (0.25 diim) Trong Matlab, d l tlnh phep toan y = ln(x), ta su dung cau lenh sau: a y = ln(x) b y = log(x) c y = loge(x) d Tat ca deu sai Cau 7: (0.25 diem) Trong cua so command cua Matlab, chung ta thuc hien lenh sau: » a=[l 3]; » b= [l;l;l]; » aAb Ket qua in la: a [1 3] b c Cau lenh bao loi d Tat ca deu sai S6 hieu: BM2/QT-PDBCL-RDTV 2/8 Cau 8: (0.25 dilm ) Trong cua so command cua Matlab, chung ta thuc hien lenh sau: » a=[l 3]; » b = a '; » a.*b Ket qua in la: a 10 b 14 c Cau lenh bao loi d Tit ca dlu sai Cau 9: (0.25 diem) Trong cua s6 Command cua Matlab, cho biet gia tri cua x chung ta thuc hien lenh sau: » x = 0:2.5:8 a 2.5 5.0 7.5 c Cau lenh bao loi b d Tat ca deu sai Cau 10: (0.25 diem) Trong cua s6 command cua Matlab, cho bi6t gia trj cua y chung ta thuc hien lenh sau: » x = 0:2:6 » y = 2*sin(x) a Vecto hang cot c Vecto hang cot b Vecot hang cot d Cau lenh bao 16i Cau 11: (0.25 diim) Cho vector x = [1 3] va y = [1 0], cau lenh nao sau day la SAI: a pie(x) b pie(x,y) c pie(y,x) d Khong cau lenh nao SAI Cau 12: (0.25 dilm) Cho vecto x co gia trj nhu sau: » x = [1:5] B6 ve d6 thi sin2(x), cau lenh nao sau day la BUNG: a plot(sin(x)A2) b plot( 'sin(x)A2 ') c fplot( 'sin(x)A2 ') d Tat ca d6u sai Cau 13: (0.25 diem) Trong cac cau lenh Matlab sau, cau lenh nao la BUNG: a » y = sym(x) b » y = syms(x) c » y = sym( 'x ') d » y = syms( 'x ') Cau 14: (0.25 diem) Cho cau lenh sau: » x= 0:10; » plot(x,sin(x),'dk') S6 hieu: BM2/QT-PBBCL-RBTV 3/2 Khi chay chuang trinh, ducmg d6 thj co dang: a Net lien, mau xanh c Net dut, mau xanh b Net li€n, mau den d Net dut, mau den Cau 15: (0.25 di£m) Cho cau lenh sau: » x = [1:5] » pIot(x,xA2) Khi chay chuong trinh, ket qua se la: a Duong d6 thi co mau xanh c Cau lenh bao loi b Duong thi c6 mau d Tat ca deu sai P H A N II - C (25 cau) Can 16: (0.25 diem) Cho a,b la bien s6 nguyen (int) va a = 5, b = 2, c = Hay cho biet gia tri cua bieu thuc: a/b/c a b c d TSt ca d6u sai Cau 17: (0.25 diem) Cho a,b la bien s6 nguyen (int) va a = 4, b = Hay cho bi6t gia tri cua bilu thuc: (++a/c)%b: a c b d Tat ca deu sai Cau 18: (0.25 diem) Cho a,b la bien so nguyen (int) va a = 4, b = Hay cho bi6t gia tri cua biSu thuc: (a++*++a)%b: a b c d Tat ca deu sai Cau 19: (0.25 diem) Cho a,b,c la cac bi6n s6 nguyen va a = 4, b = 2, c = Hay cho biet gia tri cua bieu thuc: (a>5)&&(b— 2)||(!(c==4)): a Dung/True b Sai/False Cau 20: (0.25 diem) Cho a,b la bi6n so nguyen a = 1, b = Hay cho biet gia tri cua bieu thuc: (a=0; i—) { if ( i%2 == 0) Sl[i] = S2[i+1]; else S2[i] = Sl[i+1]; } Cau 25: (0.25 diem) Cho biet gia tri cua chuSi SI sau kit thuc doan chuong trinh tren: a 51545 b 52545 c 53545 d Tit ca diu SAI Cau 26: (0.25 diem) Cho biet gia tri cua chuoi S2 sau ket thuc doan chuong trinh tren: a a3c4e b a4c5e c a5c5e d T it ca diu SAI D o a n c h u a n g trin h s a u d u n g ch o c a u ,2 : int x = 0, y = 0; int M[3][3] = {{1,2,3},{1,1,1},{3,2,1}}; for (int i = 0;i