欢迎来到天天文库
浏览记录
ID:1358838
大小:836.00 KB
页数:44页
时间:2017-11-10
《matlab编程实验报告》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、中北大学Matlab编程实验报告班级:10020741姓名:学号:10020741392013年11月2,实验一Matlab运算基础一、实验目的1、熟悉启动和退出MATLAB的方法。2、熟悉MATLAB工作窗口的组成。3、掌握建立矩阵的方法,矩阵分析与处理。4、掌握MATLAB各种表达式的书写规则以及常用函数的使用。二、实验内容1.先求下列表达式的值,然后显示MATLAB工作空间的使用情况并保存全部变量。(1)z1=2*sin(85*pi/180)/(1+exp(2))z1=0.2375(2),其中x=[2,1+2*i;-0.45,5]x=2.00001.0000
2、+2.0000i-0.45005.0000z2=1/2*log(x+sqrt(1+x*x))z2=0.7114-0.0253i0.8968+0.3658i0.2139+0.9343i1.1541-0.0044i(3)提示:利用冒号表达式生成a向量,求各点的函数值时用点乘运算。a=-3.0:0.1:3.0a=Columns1through9-3.0000-2.9000-2.8000-2.7000-2.6000-2.5000-2.4000-2.3000-2.2000Columns10through18-2.1000-2.0000-1.9000-1.8000-1.700
3、0-1.6000-1.5000-1.4000-1.3000Columns19through27-1.2000-1.1000-1.0000-0.9000-0.8000-0.7000-0.6000-0.5000-0.4000Columns28through36-0.3000-0.2000-0.100000.10000.20000.30000.40000.5000Columns37through450.60000.70000.80000.90001.00001.10001.20001.30001.4000Columns46through541.50001.60001.7
4、0001.80001.90002.00002.10002.20002.3000Columns55through612.40002.50002.60002.70002.80002.90003.0000>>z3=(exp(0.3.*a)-exp(-0.3.*a))/2.*sin(a+0.3)z3=Columns1through90.43870.50720.56400.60890.64240.66480.67660.67840.6709Columns10through180.65490.63130.60110.56520.52470.48050.43370.38540.
5、3366Columns19through270.28810.24100.19620.15430.11620.08240.05350.02990.0120Columns28through36-0.0000-0.0060-0.006000.01170.02880.05090.07750.1080Columns37through450.14180.17800.21590.25470.29340.33110.36690.39980.4289Columns46through540.45320.47190.48410.48910.48620.47480.45430.42430
6、.3846Columns55through610.33500.27550.20610.12720.0392-0.0574-0.1619(4),其中t=0:0.5:2.5提示:用逻辑表达式求分段函数值。t=0:0.5:2.5;z4=(t>=0&t<1).*(t.*t)+(t>=1&t<2).*(t.*t-1)+(t>=2&t<3).*(t.*t-2.*t-1)z4=00.250001.2500-1.00000.25001.已知,求下列表达式的值:(1)A+6.*B和A-B+I(其中I为单位矩阵)。(2)A*B和A.*B。(3)A^3和A.^3。(4)A/B和BA。
7、(5)[A,B]和[A([1,3],:);B^2]。A=[1234-4;34787;3657];B=[13-1;203;3-27];z1=A+6.*Bz1=1852-10467105215349C=eye(3);z2=A-B+Cz2=1231-3328840671z3=A*Bz3=684462309-72596154-5241z4=A.*Bz4=1210246802619-13049z5=A^3z5=372262338244860424737014918860076678688454142118820z6=A.^3z6=172839304-643930434365
8、85032
此文档下载收益归作者所有