Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
5Activity
×
0 of .
Results for:
No results containing your search query
P. 1
Dap an Thi MATLAB

Dap an Thi MATLAB

Ratings: (0)|Views: 1,066|Likes:
Published by nabi_bk
đáp án thi môn Tin học ứng dụng - kỳ 9 - Phần Matlab - ĐHBKHN
đáp án thi môn Tin học ứng dụng - kỳ 9 - Phần Matlab - ĐHBKHN

More info:

Categories:Types, Research, Science
Published by: nabi_bk on Nov 23, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

12/05/2013

pdf

text

original

 
Cau 1:a)>> % Khai bien ban dau:>> t=[0 8 14 18 22 27 38 41 50 62 66 72 76 82 93];>> n=[0 5 30 50 100 201 502 905 1305 1508 2100 2700 3001.5 2999 3001];>> % Ve cac diem do tren man hinh may tinh:>> plot(t,n,'s')b)>> % Phuong trinh mo ta bang so lieu khi biet dang tong quat:>> pt = polyfit(t,n,14)c)>> % Ve dac tinh mo ta so lieu ra man hinh:>> y = polyval(pt,t);>> plot(t,y,'-r')>> grid on % Hien luoi toa do.d)>> % Tim gia tri lon nhat cua toc do:>> nmax = max(y)------------------------------------------------------cau 2:a)File/New/M-File ---> tao file gptb2.m voi noi dung sau:function gptb2a = input('nhap gia tri a=');b = input('nhap gia tri b=');c = input('nhap gia tri c=');syms x;x = solve(a*x^2+b*x+c,'x');x = eval(x) % convert x to real variable (from string)---------hoac : File/New/M-File ---> tao file giaipt.m voi noi dung sau:function giaipt(a,b,c)syms x;x = solve(a*x^2+b*x+c);x = eval(x) % convert x to real variable (from string)Voi truong hop cu the, tai dau nhac cua MATLAB ta go: >> giaipt(1,-3,2)----------------------------------------------------------b)>> syms a c d e x>> f = a*x^5+c*x^2+d*x+e;>> dhb1_theo_x = diff(f,x)>> dhb1_theo_a = diff(f,a)>> dhb2_theo_a = diff(f,x,2)>> dhb2_theo_a = diff(f,a,2)-------------c)>> g =f+b*x^4;>> tpbd = int(g)>> a=1;>> b=2;>> c=-3;>> d=1;>> e=1;>> g = a*x^5 + b*x^4 + c*x^2 + d*x + e;>> tpxd = int(g,0,20)----------------------------------------Cau 3:
 
a)>> a = [ 2 -3 3 -1 -1; -1 2 2 -2 -1; 4 -1 2 -3 -1; 3 3 1 -2 1; 1 2 -3 -1 -1];>> b = [0;0;1;6;-2];x = a\bb)>> [x,y,z] = solve('x^2*y + x*y + z = 3','x*y^2-x*y-z = -1','x*y-x*y*z+z = 1')-----------------------------------------Cau 4:a)omega = 0.1:0.05:2*pi;s = j*omega;r = 1./7.373./s;o = 1.6.*exp(-0.12.*s)./(0.663.*s+1).^3;Wh = r.*o;re = real (Wh);im = imag (Wh);plot(re,im,'r-')-------b)>> r = tf(1,[7.373 0]);>> [num,den] = pade(0.12,5); % xap xi thoi gian tre.>> o = zpk([],[-1/0.663,-1/0.663,-1/0.663],1.6)*tf(num,den);>> Wh = r*o;>> Wk = feedback(Wh,1);>> nyquist(Wh) % Ve dac tinh tan so bien do pha cua he ho.>> step(Wk) % Ve dac tinh qua do cua he kin.>> grid on>> hold on-----------------------------------------------Cau 5:function cau5cau5.mdisp('Nhap so diem tung mon hoc ki truoc:');a=input('diem mon ATNL=');b=input('diem mon Chuyen de=');c=input('diem mon THUD=');d=input('diem mon HQNL=');disp('nhap so hoc trinh cua tung mon:');ta=input('so hoc trinh mon ATNL=');tb=input('so hoc trinh mon Chuyen de=');tc=input('so hoc trinh mon THUD=');td=input('so hoc trinh mon HQNL=');x = a*ta + b*tb + c*tc + d*td;y = ta + tb + tc + tc;disp(' Diem trung binh hoc ky = ')dtb = x/y % diem trung binh hoc kydiem = [a b c d];disp('mon hoc co diem cao nhat = ')dcn = max(diem)disp('Mon hoc co diem thap nhat = ')dtn = min(diem) % mon hoc co diem thap nhat--------------------------------------------------Cau 6:function cau6cau6.mtvtb=input('Nhiet do dau vao tuabin tvtb = ');if tvtb<440disp('Bo dieu chinh hoi qua nhiet phai cai tao lai!');

Activity (5)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Việt Phạm liked this
Le Dang Bien liked this
EmailGiotdang liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->