版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、household two bags of flour, a bag of rice, 50 kg oil, brought a detachment of their concern and sympathy. , Each batch contact team members to their respective homes, sent 200 yuan per household relief funds, gave 15 SHC families donated clothing 34 traffic police. Working Group on every one, caref
2、ully conveys the Party Central Committee and the State Council concerning agriculture, rural areas and farmers of the policy details . Set with simulation Highway, and continuous sharp mountain road, and tunnel, and rain (fog) days, and wet sliding road, and emergency situation disposal, exam projec
3、t of statewide motor vehicle driver exam field cannot landing; construction integrated 122 received at police system, and intelligent digital integrated communications platform, and intelligent video monitoring platform, and traffic signal control platform, and integrated query platform, and emergen
4、cy plans intelligent auxiliary decision system, integration of intelligent traffic command system cannot started; construction interactive, and experience type large traffic security publicity education base no special funds, Severely restricted the work of public security traffic management of leap
5、-forward development. Six management difficulty is further increased. With my States rapid economic development, urban and rural residents consumption levels increase year by year, number of motor vehicles was seen fast growth, drivers licenses to obtain and sharp growth in vehicle traffic, car work
6、 posed a serious test. The Ministry of public security promulgated 123, 124th, and the motor vehicle driver examination of work discipline, the strict implementation of the DMV nine prohibitions regulations the promulgation and implementation of the system, and his pards pipe business requires a lot
7、 of new changes on vehicle management of civilian police operations has put forward higher requirements for the quality. Current business process more cumbersome, if you need more Windows, programs, handling the complex, accepting materials can be dispensed with, inadequate levels of civilian police
8、 and window configuration, to a large extent, restrict vehicle management and applying for a drivers license for the management of masses more, wait longer, some people do not understand, resentments increase. Seven were traffic police overall quality needs to be improved. New era police traffic man
9、agement work, to police traffic police proposed has more high of requirements, rational, and peace, and civilization, and specification law enforcement behavior is promoted law enforcement standardized construction of footing points, is people of high expects, is building harmony police relationship
10、 of ties, individual police in for who law enforcement, for who service of law enforcement concept exists deviation, service consciousness, and evidence consciousness, and program consciousness and specification law enforcement consciousness also enough strong, law enforcement process in the not as,
11、 and mess as of phenomenon occurred, law enforcement not specification, andMATLAB程序设计与应用(第二版)实验参考答案%实验一 MATLAB运算基础%第一题%(1)z1=2*sin(85*pi/180)/(1+exp(2)%(2)x=2,1+2i;-0.45,5;z2=0.5*log(x+sqrt(1+x.2)%(3)a=-3.0:0.1:3.0;z3=(exp(0.3*a)-exp(-0.3*a)/2.*sin(a+0.3)+log(0.3+a)/2)%(4)t=0:0.5:2.5;z4=t.2.*(t=0&t=
12、1&t=2&t=A&A=Z);A(k)=%实验二 MATLAB矩阵分析与处理%第一题E=eye(3);R=rand(3,2);O=zeros(2,3);S=diag(2,3);A=E,R;O,S;A2B=E,(R+R*S);O,S2%第二题H=hilb(5)P=pascal(5)Hh=det(H)Hp=det(P)Th=cond(H)Tp=cond(P)%第三题:A=fix(10*rand(5)H=det(A)Trace=trace(A)Rank=rank(A)Norm=norm(A)%第四题:A=-29,6,18;20,5,12;-8,8,5V,D=eig(A)%数学意义略%第五题方法一:%
13、(1):A=1/2,1/3,1/4;1/3,1/4,1/5;1/4,1/5,1/6;b=0.95,0.67,0.52;x=inv(A)*b%(2):B=0.95,0.67,0.53;x=inv(A)*B%(3):cond(A)%第五题方法二:A=hilb(4)A(:,1)=A(4,:)=B=0.95,0.67,0.52;X=inv(A)*BB1=0.95,0.67,0.53;X1=inv(A)*B1N=cond(B)N1=cond(B1)Na=cond(A) %矩阵A为病态矩阵%第六题A=1,4,9;16,25,36;49,64,81B=sqrtm(A)C=sqrt(A) %sqrtm函数是以
14、矩阵为单位进行计算,sqrt函数是以矩阵中的元素进行计算%实验三 选择程序结构设计%第一题程序一x=-5.0,-3.0,1.0,2.0,2.5,3.0,5.0;y=; %建立存放所有y值的矩阵for x0=x if x0=0&x05&x0=2&x0=3 y=y,x0*x0-5*x0+6; else y=y,x0*x0-x0-1; endendx %输出所有xy %输出所有y%第一题程序二x=-5,-3,1,2,2.5,3,5;y=;for a=1:7if x(a)=0&x(a)100|x0disp(您输入的成绩不是百分制成绩,请重新输入。);elseif x=90disp(A);elseif
15、x=80disp(B);elseif x=70disp(C);elseif x60disp(D);elsedisp(E);endend%第二题程序二:s=input(请输入一个成绩(0分到100分之间):); %s用于存放成绩while 1 %判断输入成绩的合理性 if s100 disp(输入的成绩需在0到100之间,请重新输入:) s=input(请输入一个成绩(0分到100分之间):); else break; endendswitch fix(s/10) %对成绩做出等级判断 case 9,10 disp(A) case 8 disp(B) case 7 disp(C) case 6
16、disp(D) otherwise disp(E)end%第三题n=input(请输入员工工号:);h=input(该员工工作时数是:);if h120x=(h-120)*84*(1+0.15)+120*84;elseif h5 disp(超出了矩阵的行数,矩阵的最后一行为:) a(5,:)else disp(矩阵的第,num2str(n),行为:) a(n,:)end%实验四 循环结构程序设计%第一题程序一s=0;n=input(n=?);for i=1:n s=s+1/i/i;endPI=sqrt(6*s)pi%第一题程序二n=input(n=?);a=1:n;b=1./a.2;PI=sq
17、rt(6*sum(b)pi%第二题y=0;n=1;while(y1e-5 Xn=Xn1; Xn1=a/(b+Xn); n=n+1; if n=500 break; endendnXn1r1=(-b+sqrt(b*b+4*a)/2r2=(-b-sqrt(b*b+4*a)/2%第四题for i=1:100if i=1f(i)=1;elseif i=2f(i)=0;elseif i=3f(i)=1;elsef(i)=f(i-1)-2*f(i-2)+f(i-3);endendmax(f)min(f)sum(f)length(find(f0)length(find(f=0)length(find(f0)
18、%第五题:s=0;n=0;for i=2:49b=i*(i+1)-1;m=fix(sqrt(b);for j=2:mif rem(b,j)=0breakendendif j=mn=n+1;s=s+b;endendns%实验五 函数文件%第一题function y=mat1(x) %建立函数文件mat1.my=exp(x),log(x),sin(x),cos(x);%在命令窗口调用上述函数文件:y=mat1(1+i)%第二题程序一function a,b,N,M=shiyanwu2(m,n,t)A=m*cos(t*pi/180),-m,-sin(t*pi/180),0;m*sin(t*pi/18
19、0),0,cos(t*pi/180),0;0,n,-sin(t*pi/180),0;0,0,-cos(t*pi/180),1;B=0,9.8*m,0,9.8*n;C=inv(A)*B;a=C(1);b=C(2);N=C(3);M=C(4);%在命令窗口调用该函数文件:m1=input(m1=);m2=input(m2=);theta=input(theta=);a1,a2,N1,N2=shiyanwu2(m1,m2,theta)%第二题程序二function X=mat2(m1,m2,t)g=9.8;A=m1*cos(t*pi/180),-m1,-sin(t*pi/180),0;m1*sin(
20、t*pi/180),0,cos(t*pi/180),0;0,m2,-sin(t*pi/180),0;0,0,-cos(t*pi/180),1;B=0;m1*g;0;m2*g;X=inv(A)*B;%在命令窗口调用该函数文件:X=mat2(1,1,60)%第三题function flag=mat3(x)flag=1;for i=2:sqrt(x)if rem(x,i)=0 flag=0; break;endend%在命令窗口调用该函数文件:for i=10:99j=10*rem(i,10)+fix(i/10);if mat3(i)&mat3(j) disp(i)endend%第四题functio
21、n y=fx(x)y=1./(x-2).2+0.1)+1./(x-3).4+0.01);%在命令窗口调用该函数文件:y=fx(2)a=1,2;3,4;y=fx(a)%第五题%(1)function f1=mat5(n)f1=n+10*log(n*n+5);%在命令窗口中调用该函数文件:y=mat5(40)/(mat5(30)+mat5(20)%(2)方法一function f2=mat6(n)f2=0;for i=1:n f2=f2+i*(i+1);end%在命令窗口中调用该函数文件如:y=mat6(40)/(mat6(30)+mat6(20)%(2)方法二function f2=mat7(n
22、)i=1:n;m=i.*(i+1);f2=sum(m);end%在命令窗口中调用该函数文件如:y=mat7(40)/(mat7(30)+mat7(20)%实验六 高层绘图操作%第一题:x=linspace(0,2*pi,101);y=(0.5+3*sin(x)./(1+x.2).*cos(x);plot(x,y)%第二题:%(1)x=linspace(-2*pi,2*pi,100);y1=x.2;y2=cos(2*x);y3=y1.*y2;plot(x,y1,b-,x,y2,r:,x,y3,y-);text(4,16,leftarrow y1=x2);text(6*pi/4,-1,downar
23、row y2=cos(2*x);text(-1.5*pi,-2.25*pi*pi,uparrow y3=y1*y2);%(2)x=linspace(-2*pi,2*pi,100);y1=x.2;y2=cos(2*x);y3=y1.*y2;subplot(1,3,1);%分区plot(x,y1);title(y1=x2);%设置标题subplot(1,3,2);plot(x,y2);title(y2=cos(2*x);subplot(1,3,3);plot(x,y3);title(y3=x2*cos(2*x);%(3)x=linspace(-2*pi,2*pi,20);y1=x.2;subplo
24、t(2,2,1);%分区bar(x,y1);title(y1=x2的条形图);%设置标题subplot(2,2,2);stairs(x,y1);title(y1=x2的阶梯图);subplot(2,2,3);stem(x,y1);title(y1=x2的杆图);subplot(2,2,4);fill(x,y1,r);%如果少了r则会出错title(y1=x2的填充图);%其他的函数照样做。%第三题x=-5:0.01:5;y=;%起始设y为空向量for x0=xif x0=0 %不能写成x0=0.5n=n+1;endendp=n/30000%第二题%(1)A=45+51*rand(100,5);
25、Y,U=max(A)a,b=min(A)%(2)m=mean(A)s=std(A)%(3)sum(A,2)Y,U=max(ans)a,b=min(ans)%(4)zcj,xsxh=sort(ans)%第三题h=6:2:18;x=6.5:2:17.5;t1=18,20,22,25,30,28,24;t2=15,19,24,28,34,32,30;T1=spline(h,t1,x)T2=spline(h,t2,x)%第四题x=1:0.1:101;y1=log10(x);p=polyfit(x,y1,5)y2=polyval(p,x);plot(x,y1,:,x,y2,-)%第五题%(1)p1=1,
26、2,4,0,5;p2=1,2;p3=1,2,3;p=p1+0,conv(p2,p3) %为使两向量大小相同,所以补0%(2)A=roots(p)%(3)A=-1,1.2,-1.4;0.75,2,3.5;0,5,2.5;polyval(p,A)%(4)polyvalm(p,A)实验十程序:x=sym(6);y=sym(5);z=(x+1)/(sqrt(3+x)-sqrt(y)1、 分解因式(1)程序:syms x y;A=x4-y4;factor(A)(2)程序:factor(sym(5135)3、化简表达式(1)程序:syms beta1 beta2y=sin(beta1)*cos(beta2
27、)-cos(beta1)*sin(beta2)simple(y)(2)程序:syms xy=(4*x2+8*x+3)/(2*x+1)simple(y)5、用符号方法求下列极限或导数(1)程序:syms xf=(x*(exp(sin(x)+1)-2*(exp(tan(x)-1)/(sin(x)limit(f)(2)程序:syms xy=(sqrt(pi)-sqrt(acos(x)/(sqrt(x+1);limit(f,x,-1,right)(3) 程序:syms xy=(1-cos(2*x)/x;y1=diff(y)y2=diff(y,x,2)6、用符号方法求下列积分(1)程序:syms xf=
28、1/(1+x4+x8)int(f)(2)程序:syms xf=1/(asin(x)2)*sqrt(1-x2)int(f)(3)程序:syms xf=(x2+1)/(x4+1)int(f,x,0,inf)(4)程序:syms xf=exp(x)*(1+exp(x)2y=int(f,x,0,log(2)double(y)实验十一 级数与方程符号求解1. 级数符号求和。(1) 计算 。(2) 求级数 的和函数,并求 之和。解:M文件:clear all;clc;n=sym(n);x=sym(x);S1=symsum(1/(2*n-1),n,1,10)S2=symsum(n2*x(n-1),n,1,i
29、nf)S3=symsum(n2/5n,n,1,inf) %vpa(S3)可以转化成小数运行结果:S1 =31037876/14549535S2 =piecewise(abs(x) 1, -(x2 + x)/(x*(x - 1)3)S3 =15/322. 将lnx在x=1处按5次多项式展开为泰勒级数。解:M文件:clear all;clc;x=sym(x);f=log(x);taylor(f,x,6,1)运行结果:ans =x - (x - 1)2/2 + (x - 1)3/3 - (x - 1)4/4 + (x - 1)5/5 - 13. 求下列方程的符号解。解:M文件:clear all;c
30、lc;x1=solve(log(x+1)-5/(1+sin(x)=2)x2=solve(x2+9*sqrt(x+1)-1)x3=solve(3*x*exp(x)+5*sin(x)-78.5)x4 y4=solve(sqrt(x2+y2)-100,3*x+5*y-8)运行结果:x1 =521.67926389905839979437366649258x2 = -1 (3(1/2)*i*(4/(9*(6465(1/2)/2 + 2171/54)(1/3) - (1/2*6465(1/2) + 2171/54)(1/3)/2 - (6465(1/2)/2 + 2171/54)(1/3)/2 - 2/
31、(9*(6465(1/2)/2 + 2171/54)(1/3) + 1/3 1/3 - (6465(1/2)/2 + 2171/54)(1/3)/2 - (3(1/2)*i*(4/(9*(6465(1/2)/2 + 2171/54)(1/3) - (1/2*6465(1/2) + 2171/54)(1/3)/2 - 2/(9*(6465(1/2)/2 + 2171/54)(1/3)x3 =2.3599419584772910151699327715486x4 = 12/17 - (10*21246(1/2)/17 (10*21246(1/2)/17 + 12/17y4 = (6*21246(1
32、/2)/17 + 20/17 20/17 - (6*21246(1/2)/17 4. 求微分方程初值问题的符号解,并与数值解进行比较。 解:M文件:clear all;clc;dsolve(D2y+4*Dy+29*y,y(0)=0,Dy(0)=15,x) 运行结果:ans =(3*sin(5*x)/exp(2*x)5. 求微分方程组的通解。解:M文件:clear all;clc;x y z=dsolve(Dx=2*x-3*y+3*z,. Dy=4*x-5*y+3*z,Dz=4*x-4*y+2*z,t)运行结果:x =C1/exp(t) + C2*exp(2*t)y =C1/exp(t) + C
33、2*exp(2*t) + C3/exp(2*t)z =C2*exp(2*t) + C3/exp(2*t)实验九 数值微积分与方程数值求解1. 求函数在指定点的数值导数。 解:M文件:clc;clear;x=1;i=1;f=inline(det(x x2 x3;1 2*x 3*x2;0 2 6*x);while x0 %非齐次方程组 if rank(A)=rank(A,b) if rank(A)=n disp(有唯一解x); x=Ab; else disp(有无穷个解,特解x,基础解系y); x=Ab; y=null(A,r); end else disp(无解); x= ; endelse %
34、齐次方程组 disp(有零解x); x=zeros(n,1); if rank(A) In line_solution at 11x = -2/11 10/11 0 0 y = 1/11 -9/11 -5/11 1/11 1 0 0 1 所以原方程组的通解是: ,其中 为任意常数。5. 求代数方程的数值解。(1) 3x+sinx-ex=0在x0=1.5附近的根。(2) 在给定的初值x0=1,y0=1,z0=1下,求方程组的数值解。 解:M文件:function g=f(x)g=3*x+sin(x)-exp(x);clc;clear;fzero(f,1.5) 结果是:ans = 1289/682
35、 (2). M文件: function F=fun(X)x=X(1);y=X(2);z=X(3);F(1)=sin(x)+y2+log(z)-7;F(2)=3*x+2-z3+1;F(3)=x+y+z-5;X=fsolve(myfun,1,1,1,optimset(Display,off)运行结果:6. 求函数在指定区间的极值。(1) 在(0,1)内的最小值。(2) 在0,0附近的最小值点和最小值。解:M文件:function f=g(u)x=u(1); y=u(2); f=2*x.3+4*x.*y3-10*x.*y+y.2;clc;clear;format longf=inline(x3+co
36、s(x)+x*log(x)/exp(x);x,fmin1=fminbnd(f,0,1)U,fmin2=fminsearch(g,0,0)运行结果7. 求微分方程的数值解。 解:M文件:function xdot= sys( x,y)xdot=y(2);(5*y(2)-y(1)/x; clc;clear;x0=1.0e-9;xf=20;x,y=ode45(sys,x0,xf,0 0);x,y 运行结果:8. 求微分方程组的数值解,并绘制解的曲线。 解: 令y1=x,y2=y,y3=z; 这样方程变为: ,自变量是tM文件:function xdot=sys(x,y)xdot=y(2)*y(3);-y(1)*y(3);-0.51*y(1)*y(2); clc;clear;t0=0;tf=8;x,y=ode23(sys,t0,tf,0,1,1)plot(x,y) Quality is
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年娄烦县社区工作者招聘笔试备考题库及答案解析
- 2026年陵水黎族自治县医疗事业单位人员招聘考试参考题库及答案解析
- 2026年射阳县社区工作者招聘笔试备考题库及答案解析
- 2026年临夏县医疗事业单位人员招聘考试参考题库及答案解析
- 2026年于田县医疗事业单位人员招聘笔试模拟试题及答案解析
- 2026年乌恰县带编教师招聘笔试备考题库及答案解析
- 2026年临漳县医疗事业单位人员招聘考试模拟试题及答案解析
- 2026年彰武县医疗事业单位人员招聘笔试模拟试题及答案解析
- 2026年康县医疗事业单位人员招聘笔试模拟试题及答案解析
- 2026年静乐县带编教师招聘笔试备考题库及答案解析
- 口腔诊所合理使用抗菌药物的整改措施
- GB/T 48047-2026熔模铸件(铸钢、镍合金和钴合金)通用技术要求
- 你好疯子剧本-你好疯子话剧
- 《无人机法律法规知识》课件-第1章 民用航空法概述
- 《政府与非营利组织会计》(第七版)课件 常丽 第1-3章 政府与非营利组织会计概述、政府与非营利组织会计基本理论与方法、政府财政收支管理制度
- 河沙开采可行性方案
- 管理学(马工程)教案
- 医疗机构高警示药品风险管理规范(2023版)
- 中广核研究院热室设施建设项目 环境影响报告书(建造阶段)
- 正常人体解剖学:绪论
- -龙湖物业业主投诉、冲突与危机化解93p解析
评论
0/150
提交评论