版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、第1章一、思考题4. (1) B=A(2:5,1:2:5)(2)A(7)=(3) A=A+30(4)size(A)(5) t(find(t=0)=eps(6)t=reshape(x,3,4)(7)abs('matlab')(8)char(93)5. A=97,67,34,10;-78,75,65,5;32,5,-23,-59;0,-12,54,7 (1) B=A(1:3,:) C=A(:,1:2) D=A(2:4,3:4) E=B*C(2)A(find(A>=50 & A<=100)二、实验题1.x=-74/180*pi;y=-27/180*pi;sin(x
2、*x+y*y)/sqrt(tan(abs(x+y)+pi2.a=-3.0:0.1:3.0; exp(-0.3*a).*sin(a+0.3)3.x=2,4;-0.45,5;log(x+sqrt(1+x.*x)/24. A=3,54,2;34,-45,7;87,90,15;B=1,-2,67;2,8,74;9,3,0;(1)A*Bans = 129 432 4197 7 -407 -1052 402 591 12489A.*Bans = 3 -108 134 68 -360 518 783 270 0(2) A3ans = -28917 240246 -4368 137883 -259101 27
3、669 171333 252504 38673A.3ans = 27 157464 8 39304 -91125 343 658503 729000 3375(3)A/Bans = -5.8845 5.3549 -0.2028 6.3554 -5.6596 4.3293 -6.6325 6.2078 9.0241B/Aans = 30.2855 19.2643 -8.5614 33.4394 21.1547 -9.3974 -0.7443 -0.3938 0.2830(4)A,Bans = 3 54 2 1 -2 67 34 -45 7 2 8 74 87 90 15 9 3 0 A(1,3,
4、:);B2ans = 3 54 2 87 90 15 600 183 -81 684 282 726 15 6 8255.a=1+2i;b=3+4i;c=exp(pi*i/6)c = 0.8660 + 0.5000ic+a*b/(a+b)ans = 1.6353 + 1.8462i第2章一、思考题3.s=0;for n=0:63 s=s+2n;enddisp(s)n=0:63;s=sum(2.n)二、实验题1.x=input('输入一个四位整数:');y=fix(x/1000),mod(fix(x/100),10),mod(fix(x/10),10),mod(x,10)z=mo
5、d(y+7),10)x=z(3)*1000+z(4)*100+z(1)*10+z(2)2. gh=input('输入工号');h=input('输入工时');dj=84;if h>120 gz=dj*120+1.15*dj*(h-120);elseif h<60 gz=dj*h-700;else gz=dj*h;endformat bank;display(gh,gz)3. 循环结构n=input('input n:');s=0;for k=1:n s=s+1/k2;enddisplay(sqrt(s*6)向量运算n=input(
6、39;input n:');k=1:n;display(sqrt(sum(1./k.2)*6)4.y=0;k=0;while y<3 k=k+1; y=y+1/(2*k-1);enddisplay(k-1,y-1/(2*k-1) 5. x0=0;x=1;k=0;a=input('a=');b=input('b=');while abs(x-x0)>=1e-5 && k<500 x0=x; x=a/(b+x0); k=k+1;enddisplay(k,x);display(-b+sqrt(b2+4*a)/2,(-b-sqr
7、t(b2+4*a)/2);6.y=fun(40)/(fun(30)+fun(20)(1)函数文件fun.mfunction f=fun(n)f=n+log(n2+5);(2)函数文件fun.mfunction f=fun(n)a=1:n;f=sum(a.*(a+1);第3章一、思考题4. t=0:0.01:1.5;y=sqrt(3)/2*exp(-4*t).*sin(4*sqrt(3)*t+pi/3);5. x=-10:0.01:10;y=linspace(-6,6,size(x,2)z=x.3+3*x.*y.2;plot3(x,y,z)6. x=100:100:400;y=100:100:4
8、00;z=636,697,624,478;698,712,630,478;680,674,598,412;662,626,552,334;X,Y=meshgrid(x,y);mesh(X,Y,z)二、实验题1. (1)x=-10:0.01:10;plot(x,x-x.3/3/2)(2)plot(x,exp(-x.*x/2)/2/pi)(3)x=-8:0.01:8;plot(x,sqrt(64-x.*x)/2)(4)t=0:pi/100:6*pi;plot(t.*sin(t),t.*cos(t)2. (1)x1=linspace(0,1,100);y1=2*x1-0.5;t=linspace(0
9、,pi,100);x=sin(3*t).*cos(t);y=sin(3*t).*sin(t);plot(x1,y1,'r-',x,y,'b:');text(0.4,1,'y=2x-0.5');text(-0.4,0.5,'x=sin(3t)cos(t)');text(-0.4,0.3,'y=sin(3t)sin(t)');(2) subplot(1,2,1);scatter(x1,y1,10) title('y=2x-0.5');subplot(1,2,2);scatter(x,y,10)3. su
10、bplot(1,2,1); x=1:1:100; y=sin(1./x);plot(x,y)subplot(1,2,2);fplot('sin(1/x)',1,100)4. subplot(2,2,1);bar(t,y);subplot(2,2,2);stairs(t,y);subplot(2,2,3);stem(t,y)subplot(2,2,4);semilogy(t,y);5. theta=linspace(-pi,pi,100);ro=5.*cos(theta)+4;polar(theta,ro);fi=linspace(0,2*pi,100);a=1r=a.*(1+c
11、os(fi);polar(fi,r);6. t=0:pi/20:2*pi;x=exp(-t./20).*cos(t);y=exp(-t./20).*sin(t);z=t;plot3(x,y,z);t=0:0.01:1;x=t;y=t.2;z=t.3;plot3(x,y,z);7. x=-30:0.1:0;y=0:0.1:30;x,y=meshgrid(x,y);z=10.*sin(sqrt(x.2+y.2)./sqrt(1+x.2+y.2);meshc(x,y,z);8. x=linspace(-3,3,100);y=linspace(-3,3,100);x y=meshgrid(x,y);f
12、xy=-5./(1+x.2+y.2);i=find(abs(x)<=0.8 & abs(y)<=0.5);fxy(i)=NaN;surf(x,y,fxy)9. u=linspace(1,10,100);v=linspace(-pi,pi,100);u,v=meshgrid(u,v);x=3.*u.*sin(v);y=2.*u.*cos(v);z=4*u.2;x=3*u.*sin(v);y=2*u.*cos(v);z=4*u.2;surf(x,y,z);shading interp;light('position',1,0,1);10. t=0:pi/100:
13、2*pi;y=sin(t);comet(t,y)第4章一、思考题5.(1)A=eye(3);(2)C=100+(200-100)*rand(5,6);(3)D=1+sqrt(0.2)*randn(1,500);(4)E=ones(size(A);(5)A=A+30*eye(size(A);(6)B=diag(diag(A)二、实验题1. P=pascal(5);H=hilb(5);Dp=det(P);Dh=det(H);Kp=cond(P);Kh=cond(H);P矩阵的性能更好,因为Kp较小2.A=1,-1,2,3;0,9,3,3;7,-5,0,2;23,6,8,3B=3,pi/2,45;3
14、2,-76,sqrt(37);5,72,4.5e-4;exp(2),0,97A1=diag(A);B1=diag(B);A2=triu(A);B2=triu(B);A3=tril(A);B3=tril(B);rA=rank(A);rB=rank(B);nA=norm(A);nb=norm(B);cA=cond(A);cB=cond(B);3. A=31,1,0;-4,-1,0;4,-8,-2;V,D=eig(A);4. A=diag(-1,-1,-1,-1,-1)+diag(-1,-1,-1,-1,1)+diag(2,2,2,2,2)b=1,0,0,0,0'x1=inv(A)*b;x2
15、=Ab;L,U=lu(A);x3=U(Lb);Q,R=qr(a);Q,R=qr(A);x4=R(Qb)R=chol(A);x5=R(R'b)5. B=sparse(A);x1=inv(B)*b;x2=Bb;L,U=lu(B);x3=U(Lb);第5章一、思考题3.A=randn(10,5);mean(A)std(A)max(max(A)min(min(A)sum(A,2)sum(sum(A)sort(A,1)sort(A,2,'descend')二、实验题1. A=rand(1,30000);mean(A)std(A)max(A)min(A)size(find(A>
16、;0.5)/size(A)2. h=466,715,950,1422,1635;w=7.04,4.28,3.40,2.52,2.13;hh=500,900,1500;ww=interp1(h,w,hh,'spline')3. x=linspace(1,10,50);y=log(x);f=polyfit(x,y,5);yy=polyval(f,x);plot(x,y,'r-',x,yy,'g.')4. N=64; % 采样点数T=5; % 采样时间终点t=linspace(0,T,N); % 给出N个采样时间ti(I=1:N)x=3*exp(-t)
17、; % 求各采样点样本值xdt=t(2)-t(1); % 采样周期f=1/dt; % 采样频率(Hz)X=fft(x); % 计算x的快速傅立叶变换XF=X(1:N/2+1); % F(k)=X(k)(k=1:N/2+1)f=f*(0:N/2)/N; % 使频率轴f从零开始plot(f,abs(F),'-*') % 绘制振幅-频率图xlabel('Frequency');ylabel('|F(k)|')5. (1)p1=1 2 0 0 7;p2=1 -2;p3=1 0 0 5 1;p12=conv(p1,p2);p=p12+zeros(1,siz
18、e(p12,2)-size(p3,2),p3;roots(p)(2)A=-1,4,3;2,1,5;0,5,6;Px=polyval(p,A)Pxm=polyvalm(p,A)6.(1) z=fzero('3*x-sin(x)+1',0)(2) 建立函数文件myfun.mfunction F=myfun(X)x=X(1);y=X(2);F(1)=x*x+y*y-9;F(2)=x+y-1;在命令窗口中输入以下命令:x=fsolve(myfun,3,0',optimset('Display','off')第6章一、思考题2.fx=inline(
19、'1./(1+x.2)');I,n=quad(fx,-100000,100000,1e-3);I,n=quadl(fx,-100000,100000,1e-3);x=-100000:0.01:100000;y=1./(1+x.*x);trapz(x,y);3.(1) fx=inline('-2*y+2*x*x+2*x');t,y=ode23(fx,0,0.5,1)(2) fx=inline('y-exp(x)*cos(x)');t,y=ode23(fx,0,3,1)二、实验题1. for x=1:3 fx=x,x2,x3;1,2*x,3*x;0,
20、2,6*x; diff(fx)end2.(1)x=0:0.01:1;y=x.10+10.x+1./log10(x);dy=diff(y)/0.01;(2)x=0:0.01:1;y=log(1+x);dy=diff(y,2)/0.01;plot(x(1:99),dy)3.(1)fx=inline('x.2.*sqrt(2*x.*x+3)'); quad(fx,1,5)(2)fx=inline('x./sin(x).2'); quad(fx,pi/4,pi/3)(3)fx=inline('abs(cos(x+y)'); dblquad(fx,0,pi
21、,0,pi)(4)syms x y;fx=x*y; int(int(fx,y2,y+2),-1,2)x的积分区间为【0,2】时fx=inline('x.*y'); dblquad(fx,0,2,-1,2)4.x=0.3:0.2:1.5;y=0.3895,0.6598,0.9147,1.1611,1.3971,1.6212,1.8325;trapz(x,y)5.(1)yp=inline('-(1.2+sin(10*x)*y'); t,y=ode23(yp,0,5,1); (2)令,则可写出原方程的状态方程形式: -> 建立函数文件ztfun.mfunctio
22、n y=ztfun(t,x)b=0;0;cos(t);y=0,1,0;0,0,1;-1/(3+sin(t),-1,5*cos(2*t)/(t+1)2*x+b;解微分方程组t,y=ode23(ztfun,0,5,1;0;2);6.建立函数文件ztfun.mfunction yy=ztfun(t,y)yy=y(2)*y(3);-y(1)*y(3);-0.51*y(1)*y(2);解微分方程组t,y=ode23(ztfun,0,5,0;1;1)第7章一、思考题3.(1)数值积分fx=inline('exp(x).*(1+exp(x).2');quad(fx,0,log(2)符号积分f
23、=sym('exp(x)*(1+exp(x)2');v=int(f,0,log(2);eval(v)(2)略二、实验题1.A=sym('1,2,3;x,y,z;3,2,1')rank(A)inv(A)det(A)2.(1) y=sym('sqrt(x+sqrt(x+sqrt(x)');y1=diff(y)y2=diff(y,'x',2)(2) syms x y;fxy=sin(x2*y)*exp(-x2-y);diff(diff(fxy,x),y)3.(1) syms xint(1/(1+x4)(2) syms x tint(-2
24、*x*x+1)/(2*x*x-3*x+1)2,x,cos(t),exp(2*t)4.syms n xsymsum(1/(2*n+1)/(2*x+1)(2*n+1),n,0,inf)symsum(1/(2*n+1)/(2*x+1)(2*n+1),n,0,5)5.(1) syms xtaylor(exp(x)+exp(-x)/2,5,0)(2) syms a xtaylor(exp(-5*x)*sin(3*x+pi/3),5,a)6.(1)x=solve(sym('x3+a*x+1=0')(2) x y=solve(sym('sqrt(x2+y2)-100=0,3*x+5*
25、y-8=0')7. 方程转化为: 符号解y1,y11=dsolve('Dy=y1,Dy1+y=1-t2/pi','y(-2)=5,y1(-2)=5','t')数值解编写函数文件ztfun.mfunction yy=ztfun(t,y)yy=y(2);1-t2/pi-y(1);在命令窗口输入以下命令t,y=ode45(ztfun,-2,7,-5;5);t=linspace(-2,7,49)y2=y8. x,y=dsolve('Dx=3*x+4*y,Dy=-4*x+3*y','x(0)=0,y(0)=1')第9
26、章二、实验题1.(1)新建一个Blank GUI。(2)在窗口上添加一个Static Text、一个Edit Text,一个Push Botton,两个Check Box,一组Radio Button。各控件的属性设置如表9.1所示。表9.1界面控件属性控 件属 性 名属 性 值静态文本框String实验一:编辑框String按钮String设置字体大小单选按钮1Stringred单选按钮2Stringyellow单选按钮3Stringblue单选按钮4StringblackValue1.0复选框1String倾斜复选框2String加粗(3)在按钮的Callback函数中添加以下代码:s=e
27、val(get(handles.edit1,'String');set(handles.text1,'FontSize',s);(4)在复选框1的Callback函数中添加以下代码:if (get(hObject,'Value') = get(hObject,'Max') set(handles.text1,'FontAngle','italic');else set(handles.text1,'FontAngle','normal');end在复选框2的Callb
28、ack函数中添加以下代码:if (get(hObject,'Value') = get(hObject,'Max') set(handles.text1,'FontWeight','bold');else set(handles.text1,'FontAngle','normal');end(5)在单选按钮组的SelectionChangeFcn函数中添加以下代码:set(handles.text1,'ForegroundColor',get(eventdata.NewValue,&
29、#39;string');2.(1)新建一个Blank GUI。(2)用菜单编辑器编辑菜单,各菜单项属性如表9.2.表9.2菜单项属性菜单项Label 属 性 值Tag 属 性 值MenuLineLabelm_lineHelpHelpm_helpLine Menu ItemLine StyleLine Stylem_linestyleLine WidthLine Widthm_linewidthLine ColorLine Colorm linecolorHelp Menu ItemAboutAboutm_about(3)绘图。在窗口的OpeningFcn函数添加以下代码:global
30、 h;t=0:0.01:6;h=plot(t.*sin(t),t.*cos(t)(4)在Line Style菜单项的Callback函数中添加以下代码:global h;set(h,'LineStyle','-.');在Line Width菜单项的Callback函数中添加以下代码:global h;set(h,'LineWidth',2);在Line Color菜单项的Callback函数中添加以下代码:global h;set(h,'color','red');在About菜单项的Callback函数中添加以下
31、代码:msgbox('Help Item');3.t=0:pi/20:6*pi;a=2;b=3;r=a+b*t;h_draw=polar(t,r,'-*');h_menu=uicontextmenu; %½¨Á¢¿ì½Ý²Ëµ¥ %½¨Á¢²Ëµ¥Ïîuimenu(h_menu,'Label','red','
32、;Call','set(h_draw,''Color'',''red'');');uimenu(h_menu,'Label','yellow','Call','set(h_draw,''Color'',''yellow'');');uimenu(h_menu,'Label','blue','Call','set(h_draw,
33、''Color'',''blue'');');set(h_draw,'UIContextMenu',h_menu); %½«¸Ã¿ì½Ý²Ëµ¥ºÍÇúÏß¶ÔÏóÁªÏµÆðÀ´4.(1)新建一个Blank G
34、UI。(2)在窗口上添加三个Static Text、三个Edit Text,一个Push Botton,一个坐标轴对象Axes。各控件的属性设置如表9.3所示。表9.3界面控件属性控 件属 性 名属 性 值Static Texttext1Stringa:text1Stringb:text1Stringn:Edit Textedit1Stringedit2Stringedit3Stringpushbotton1String绘图Axes1width100height25(3)在按钮pushbutton1的Callback函数中添加以下代码:t=0:pi/20:6*pi;a=eval(get(han
35、dles.edit1,'String');b=eval(get(handles.edit2,'String');n=eval(get(handles.edit3,'String');r=a.*cos(b+n.*t);polar(handles.axes1,t,r);第10章二、实验题1.建立模型exercise10_1.mdl(1)双击Gain模块,打开Function Block Parameters进行设置。设置完成后,单击模型编辑窗口的Start Simulation按钮,观察曲线。(2)选择Math Operation模块库的Slide
36、Gain模块替代Gain模块2.略3. Scope的双输入实现方法:双击Scope模块,打开Scope示波器窗口,单击该窗口工具栏的Parameters 按钮(左数第二个),在打开的对话框的General选项卡的Numbers of axes:后的编辑框中输入2,然后单击OK按钮返回,即可看到模型中的Scope模块增加了一个输入口4.(1)先建立如下模型(2)建立子系统。选中除输入输出模块外其他模块,执行Edit菜单的Create Subsystem命令。(3)封装子系统。选中子系统模块,执行Edit菜单的Mask Subsystem命令。在Mask Editor对话框的Parameters选
37、项卡中的Dialog Parameters栏内增加三个变量,单击OK按钮返回。5.(1)建立S函数subsection.mfunction sys,x0,str,ts=subsection(t,x,u,flag)switch flagcase 0 sys,x0,str,ts=mdlInitializeSizes; case 3 sys=mdlOutputs(t,x,u); case 1,2,4,9 sys=;otherwise error('Unhandled Flag', num2str(flag);end function sys,x0,str,ts=mdlInitiali
38、zeSizes()sizes=simsizes;sizes.NumContStates=0; sizes.NumDiscStates=0; sizes.NumOutputs=1; sizes.NumInputs=1; sizes.DirFeedthrough=1; sizes.NumSampleTimes=1; sys=simsizes(sizes);x0=; str=; ts=-1,0; function sys=mdlOutputs(t,x,u)if u>=0 & u<2 sys=u*u;elseif u>=2 & u<5 sys=4;elseif
39、u>=5 & u<7 sys=14-2*u;else sys=0;end(2)模块的封装与测试参见教材Page 202第11章二、实验题2. (1)建立EXCEL文件,如气温.xls(2) Spreadsheet Link的安装与启动参见教材P206(3)在Excel中选中需要的数据,单击Spreadsheet Link工具栏的“putmatrix”按钮,指定导入MATLAB工作空间的变量名。(4)单击Spreadsheet Link工具栏中的“wizard”按钮,弹出“MATLAB Function Wizard”对话框。在“Select a category”栏内选择m
40、atlabpolyfun 类后,在“Select a function”栏选择spline函数,在“Select a function signature”栏内中选中spline(x,y,xx),弹出“Function Arguments”对话框。在对话框中的Inputs栏X右边的展开按钮,然后选中EXCEL表中的第1列数据(除标题行),按Enter键确认,返回“Function Arguments”对话框。单击对话框Inputs栏右部的下拉条,使变量变为Y,同样的方式设定Y的值,接着设定XX变量的值。然后单击Optional output cell(s) 右边的展开按钮,在Excel表中选中
41、输出数据使用的单元格,返回对话框后单击OK按钮,完成计算。3. clear allfid=fopen('exercise9_1.m','r');textall=fscanf(fid,'%c',inf);ch=zeros(26,1); for n=1:size(textall,2) if isletter(textall(n) if textall(n)>='a' && textall(n)<='z' textall(n)=char(textall(n)-('a'-'
42、;A'); end m=textall(n)-'A'+1; ch(m)=ch(m)+1; endend4. (1)编辑c源程序exercise11_4.c,代码如下:#include <stdio.h>#include <string.h> /* For strcmp() */#include <stdlib.h> /* For EXIT_FAILURE, EXIT_SUCCESS */#include <math.h>#include "mat.h"#define BUFSIZE 256#define
43、 k1 39#define k2 71 int main() MATFile *pmat; mxArray *pa1, *pa2, *pa3; double datak1k2; const char *file = "mat11_4.mat" char strBUFSIZE; int status; int n1,n2; for(n1=0;n1<k1;n1+) for(n2=0;n2<k2;n2+) datan1n2=pow(n1+1.0)*(n2+1),1/3.0); printf("Creating file %s.nn", file);
44、 pmat = matOpen(file, "w"); if (pmat = NULL) printf("Error creating file %sn", file); printf("(Do you have write permission in this directory?)n"); return(EXIT_FAILURE); pa1 = mxCreateDoubleMatrix(k1,k2,mxREAL); if (pa1 = NULL) printf("%s : Out of memory on line %d
45、n", _FILE_, _LINE_); printf("Unable to create mxArray.n"); return(EXIT_FAILURE); pa2 = mxCreateDoubleMatrix(k1,k2,mxREAL); if (pa2 = NULL) printf("%s : Out of memory on line %dn", _FILE_, _LINE_); printf("Unable to create mxArray.n"); return(EXIT_FAILURE); memcpy(v
46、oid *)(mxGetPr(pa2), (void *)data, sizeof(data); pa3 = mxCreateString("MATLAB: the language of technical computing"); if (pa3 = NULL) printf("%s : Out of memory on line %dn", _FILE_, _LINE_); printf("Unable to create string mxArray.n"); return(EXIT_FAILURE); status = ma
47、tPutVariable(pmat, "LocalDouble", pa1); if (status != 0) printf("%s : Error using matPutVariable on line %dn", _FILE_, _LINE_); return(EXIT_FAILURE); status = matPutVariableAsGlobal(pmat, "GlobalDouble", pa2); if (status != 0) printf("Error using matPutVariableAsGl
48、obaln"); return(EXIT_FAILURE); status = matPutVariable(pmat, "LocalString", pa3); if (status != 0) printf("%s : Error using matPutVariable on line %dn", _FILE_, _LINE_); return(EXIT_FAILURE); memcpy(void *)(mxGetPr(pa1), (void *)data, sizeof(data); status = matPutVariable(pm
49、at, "LocalDouble", pa1); if (status != 0) printf("%s : Error using matPutVariable on line %dn", _FILE_, _LINE_); return(EXIT_FAILURE); mxDestroyArray(pa1); mxDestroyArray(pa2); mxDestroyArray(pa3); if (matClose(pmat) != 0) printf("Error closing file %sn",file); return(E
50、XIT_FAILURE); pmat = matOpen(file, "r"); if (pmat = NULL) printf("Error reopening file %sn", file); return(EXIT_FAILURE); pa1 = matGetVariable(pmat, "LocalDouble"); if (pa1 = NULL) printf("Error reading existing matrix LocalDoublen"); return(EXIT_FAILURE); if
51、(mxGetNumberOfDimensions(pa1) != 2) printf("Error saving matrix: result does not have two dimensionsn"); return(EXIT_FAILURE); pa2 = matGetVariable(pmat, "GlobalDouble"); if (pa2 = NULL) printf("Error reading existing matrix GlobalDoublen"); return(EXIT_FAILURE); if (!(
52、mxIsFromGlobalWS(pa2) printf("Error saving global matrix: result is not globaln"); return(EXIT_FAILURE); pa3 = matGetVariable(pmat, "LocalString"); if (pa3 = NULL) printf("Error reading existing matrix LocalStringn"); return(EXIT_FAILURE); status = mxGetString(pa3, str,
53、 sizeof(str); if(status != 0) printf("Not enough space. String is truncated."); return(EXIT_FAILURE); if (strcmp(str, "MATLAB: the language of technical computing") printf("Error saving string: result has incorrect contentsn"); return(EXIT_FAILURE); /* clean up before e
54、xit */ mxDestroyArray(pa1); mxDestroyArray(pa2); mxDestroyArray(pa3); if (matClose(pmat) != 0) printf("Error closing file %sn",file); return(EXIT_FAILURE); printf("Donen"); return(EXIT_SUCCESS);(2)在MATLAB命令窗口输入以下命令编译(假定本机安装的编译器是Microsoft Visual Studio 2005)optsfile = matlabroot 'binwin32mexoptsmsvc80engmatopts.bat'mex('-f',optsfile,'exercise11_4.c')(3)编译完成后,运行exercise11_4.exe5. (1)编辑c源程序exercise11_5.c,代码如下:#include <stdlib.h>#
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 屋面套管防腐施工方案(3篇)
- 应急预案专家认证(3篇)
- 户外管道安装施工方案(3篇)
- 景区营销庙会方案(3篇)
- 桥头别墅装修施工方案(3篇)
- 水洗灯施工方案范本(3篇)
- 烧结室框架施工方案(3篇)
- 病案应急预案总结(3篇)
- 积分考点精炼综合测评试卷
- 罐底板更换施工方案(3篇)
- 关于项目物业退场的告知函(致街道等部门)
- 小学爱国卫生运动宣传
- 中试平台运营管理制度
- T/ZHCA 002-2018化妆品控油功效测试方法
- 2025年中粮集团招聘笔试参考题库含答案解析
- 中药材购销合作意向书
- 零工市场(驿站)运营管理 投标方案(技术方案)
- 第一中学高二下学期期中考试语文试题(含答案)
- 2022年北京大学生生物学知识竞赛题库
- 挖机上楼拆迁施工方案
- 小学语文绘本阅读《神奇飞书》课件-
评论
0/150
提交评论