freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[教育學(xué)]matlab數(shù)學(xué)實驗答案胡良劍(編輯修改稿)

2025-02-04 20:17 本頁面
 

【文章內(nèi)容簡介】 right = 6 left=prod(eig(A)), right=det(A) %原題有錯 , (1)^n應(yīng)刪去 left = right = 27 fA=(Ap(1)*eye(3,3))*(Ap(2)*eye(3,3))*(Ap(3)*eye(3,3)) fA = * 0 norm(fA) %f(A)范數(shù)接近 0 ans = %Exercise 1(1) roots([1 1 1]) %Exercise 1(2) roots([3 0 4 0 2 1]) %Exercise 1(3) p=zeros(1,24)。 p([1 17 18 22])=[5 6 8 5]。 roots(p) %Exercise 1(4) p1=[2 3]。 p2=conv(p1, p1)。 p3=conv(p1, p2)。 p3(end)=p3(end)4。 %原 p3最后一個分量 4 roots(p3) %Exercise 2 fun=inline(39。x*log(sqrt(x^21)+x)sqrt(x^21)*x39。)。 fzero(fun,2) %Exercise 3 fun=inline(39。x^42^x39。)。 fplot(fun,[2 2])。grid on。 fzero(fun,1),fzero(fun,1),fminbnd(fun,) %Exercise 4 fun=inline(39。x*sin(1/x)39。,39。x39。)。 fplot(fun, [ ])。 x=zeros(1,10)。for i=1:10, x(i)=fzero(fun,()*)。end。 x=[x,x] %Exercise 5 fun=inline(39。[9*x(1)^2+36*x(2)^2+4*x(3)^236。x(1)^22*x(2)^220*x(3)。16*x(1)x(1)^32*x(2)^216*x(3)^2]39。,39。x39。)。 [a,b,c]=fsolve(fun,[0 0 0]) %Exercise 6 fun=@(x)[x(1)*sin(x(1))*cos(x(2)),x(2)*cos(x(1))+*sin(x(2))]。 [a,b,c]=fsolve(fun,[ ]) %Exercise 7 clear。 close。 t=0:pi/100:2*pi。 x1=2+sqrt(5)*cos(t)。 y1=32*x1+sqrt(5)*sin(t)。 x2=3+sqrt(2)*cos(t)。 y2=6*sin(t)。 plot(x1,y1,x2,y2)。 grid on。 %作圖發(fā)現(xiàn) 4個解的大致位置 , 然后分別求解 y1=fsolve(39。[(x(1)2)^2+(x(2)3+2*x(1))^25,2*(x(1)3)^2+(x(2)/3)^24]39。,[,2]) y2=fsolve(39。[(x(1)2)^2+(x(2)3+2*x(1))^25,2*(x(1)3)^2+(x(2)/3)^24]39。,[,2]) y3=fsolve(39。[(x(1)2)^2+(x(2)3+2*x(1))^25,2*(x(1)3)^2+(x(2)/3)^24]39。,[,5]) y4=fsolve(39。[(x(1)2)^2+(x(2)3+2*x(1))^25,2*(x(1)3)^2+(x(2)/3)^24]39。,[4,4]) %Exercise 8(1) clear。 fun=inline(39。x.^2.*sin(x.^2x2)39。)。 fplot(fun,[2 2])。grid on。 %作圖觀察 x(1)=2。 x(3)=fminbnd(fun,1,)。 x(5)=fminbnd(fun,1,2)。 fun2=inline(39。x.^2.*sin(x.^2x2)39。)。 x(2)=fminbnd(fun2,2,1)。 x(4)=fminbnd(fun2,)。 x(6)=2 feval(fun,x) %答案 : 以上 x(1)(3)(5)是局部極小, x(2)(4)(6)是局部極大,從最后一句知道 x(1)全局最小, x(2)最大。 %Exercise 8(2) clear。 fun=inline(39。3*x.^520*x.^3+1039。)。 fplot(fun,[3 3])。grid on。%作圖觀察 x(1)=3。 x(3)=fminsearch(fun,)。 fun2=inline(39。(3*x.^520*x.^3+10)39。)。 x(2)=fminsearch(fun2,)。 x(4)=3。 feval(fun,x) %Exercise 8(3) fun=inline(39。abs(x^3x^2x2)39。)。 fplot(fun,[0 3])。grid on。%作圖觀察 fminbnd(fun,) fun2=inline(39。abs(x^3x^2x2)39。)。 fminbnd(fun2,) %Exercise 9 close。 x=2::1。y=7::1。 [x,y]=meshgrid(x,y)。 z=y.^3/9+3*x.^2.*y+9*x.^2+y.^2+x.*y+9。 mesh(x,y,z)。grid on。%作圖觀察 fun=inline(39。x(2)^3/9+3*x(1)^2*x(2)+9*x(1)^2+x(2)^2+x(1)*x(2)+939。)。 x=fminsearch(fun,[0 0])%求極小值 fun2=inline(39。(x(2)^3/9+3*x(1)^2*x(2)+9*x(1)^2+x(2)^2+x(1)*x(2)+9)39。)。 x=fminsearch(fun2,[0 5])%求極大值 %Exercise 10 clear。t=0:24。 c=[15 14 14 14 14 15 16 18 20 22 23 25 28 ... 31 32 31 29 27 25 24 22 20 18 17 16]。 p2=polyfit(t,c,2) p3=polyfit(t,c,3) fun=inline(39。a(1)*exp(a(2)*(t14).^2)39。,39。a39。,39。t39。)。 a=lsqcurvefit(fun,[0 0],t,c)%初值可以試探 f=feval(fun, a,t) norm(fc)%擬合效果 plot(t,c,t,f) %作圖檢驗 fun2=inline(39。b(1)*sin(pi/12*t+b(2))+2039。,39。b39。,39。t39。)。%原題修改 f(x)+20 b=lsqcurvefit(fun2,[0 0],t,c) figure f2=feval(fun2, b,t) norm(f2c)%擬合效果 plot(t,c,t,f2) %作圖檢驗 %Exercise 11 fun=inline(39。(1x)*sqrt(+x)*x*sqrt(1+x)*sqrt(5)39。)。 x=fzero(fun, 0, 1) %Exercise 12 r=。N=20*12。 x=7500*180 %房屋總價格 y=x* %首付款額 x0=xy%貸款總額 a=(1+r)^N*r*x0/((1+r)^N1)%月付還款額 r1=。x1=10*10000。%公積金貸款 a1=(1+r1)^N*r1*x1/((1+r1)^N1) x2=x0x1%商業(yè)貸款 a2=(1+r)^N*r*x2/((1+r)^N1) a=a1+a2 %Exercise 13 %列方程 th*R^2+(pi2*th)*r^2R*r*sin(th)=pi*r^2/2 %化簡得 sin(2*th)2*th*cos(2*th)=pi/2 %以下 Matlab計算 clear。fun= inline(39。sin(2*th)2*th*cos(2*th)pi/239。,39。th39。) th=fsolve(fun,pi/4) R=20*cos(th) %Exercise 14 %先在 Editor窗口寫 M函數(shù)保存 function x=secant(fname,x0,x1,e) while abs(x0x1)e, x=x1(x1x0)*feval(fname,x1)/(feval(fname,x1)feval(fname,x0))。 x0=x1。x1=x。 end %再在指令窗口 fun=inline(39。x*log(sqrt(x^21)+x)sqrt(x^21)*x39。)。 secant(fun,1,2,1e8) %Exercise 15 %作系數(shù)為 a,初值為 xo,從第 m步到第 n步迭代過程的 M函數(shù): function f=ex4_15fun(a,x0,m,n) x(1)=x0。 y(1)=a*x(1)+1。x(2)=y(1)。 if m2, plot([x(1),x(1),x(2)],[0,y(1),y(1)])。hold on。 end for i=2:n y(i)=a*x(i)+1。 x(i+1)=y(i)。 if im, plot([x(i),x(i
點擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1