




已阅读5页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
X=magic(3)X = 8 1 6 3 5 7 4 9 2 K=eye(3)K = 1 0 0 0 1 0 0 0 1 L=zeros(3)L = 0 0 0 0 0 0 0 0 0 M=ones(3)M = 1 1 1 1 1 1 1 1 1 Y=(1 2 3;4 5 6;7 8 9)? Y=(1 2 3;4 5 6;7 8 9) |Error: Unexpected MATLAB expression. Y=1 2 3;4 5 6;7 8 9Y = 1 2 3 4 5 6 7 8 9 Z=zeros(4,5)Z = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A=magic(4)A = 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1 A1=zeros(size(A)A1 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 B=rand(5)B = 0.8147 0.0975 0.1576 0.1419 0.6557 0.9058 0.2785 0.9706 0.4218 0.0357 0.1270 0.5469 0.9572 0.9157 0.8491 0.9134 0.9575 0.4854 0.7922 0.9340 0.6324 0.9649 0.8003 0.9595 0.6787 n=find(B B(n)=B(n)+1B = 0.8147 1.0975 1.1576 1.1419 0.6557 0.9058 1.2785 0.9706 0.4218 1.0357 1.1270 0.5469 0.9572 0.9157 0.8491 0.9134 0.9575 0.4854 0.7922 0.9340 0.6324 0.9649 0.8003 0.9595 0.6787 C1=B(1:2:end,:)C1 = 0.8147 1.0975 1.1576 1.1419 0.6557 1.1270 0.5469 0.9572 0.9157 0.8491 0.6324 0.9649 0.8003 0.9595 0.6787 C2=B(3,2,1,2,3,4)C2 = 0.5469 0.9572 0.9157 1.2785 0.9706 0.4218 1.0975 1.1576 1.1419 X+Yans = 9 3 9 7 10 13 11 17 11 X-Yans = 7 -1 3 -1 0 1 -3 1 -7 X*Yans = 54 69 84 72 87 102 54 69 84 X/YWarning: Matrix is singular to working precision.ans = NaN Inf -Inf NaN -Inf Inf NaN -Inf Inf XYans = 0.0167 0.0833 0.1500 0.7667 0.8333 0.9000 0.0167 0.0833 0.1500 K/YWarning: Matrix is singular to working precision.ans = NaN Inf -Inf NaN -Inf Inf NaN Inf -Inf X/MWarning: Matrix is singular to working precision.ans = Inf NaN NaN -Inf NaN NaN Inf NaN NaN d=X/YWarning: Matrix is singular to working precision.d = NaN Inf -Inf NaN -Inf Inf NaN -Inf Inf d=(X-1)*Yd = 0.0167 0.0833 0.1500 0.7667 0.8333 0.9000 0.0167 0.0833 0.1500 X*(Y-1)Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.541976e-018.ans = 1.0e+017 * -0.5404 1.0809 -0.5404 0.0000 0 0 0.5404 -1.0809 0.5404(X=Y).*Xans = 8 0 6 0 5 7 0 9 0 p=3,4.2,0,-5,-6.8,5p = 3.0000 4.2000 0 -5.0000 -6.8000 5.0000 x=roots(p)x = -1.5771 -0.6897 + 1.1756i -0.6897 - 1.1756i 0.9705 0.5861 x=1:1:30x = Columns 1 through 13 1 2 3 4 5 6 7 8 9 10 11 12 13 Columns 14 through 26 14 15 16 17 18 19 20 21 22 23 24 25 26 Columns 27 through 30 27 28 29 30 y=polyval(p,x)y = 1.0e+007 * Columns 1 through 7 0.0000 0.0000 0.0001 0.0004 0.0012 0.0029 0.0060 Columns 8 through 14 0.0115 0.0204 0.0341 0.0544 0.0833 0.1233 0.1774 Columns 15 through 21 0.2490 0.3420 0.4609 0.6108 0.7974 1.0270 1.3067 Columns 22 through 28 1.6442 2.0482 2.5278 3.0934 3.7560 4.5275 5.4209 Columns 29 through 30 6.4500 7.6297 plot(x,y)实验一 Warning: Could not get change notification handle for local C:ProgramFilesMATLABR2007bwork.Performance degradation may occur due to on-disk directory change checking. help sqrt SQRT Square root. SQRT(X) is the square root of the elements of X. Complex results are produced if X is not positive. See also sqrtm, realsqrt, hypot. Overloaded methods: darray/sqrt sym/sqrt Reference page in Help browser doc sqrt clear a1=5a1 = 5 a2=3+5ia2 = 3.0000 + 5.0000i b1=linspace(3,8,20)b1 = Columns 1 through 9 3.0000 3.2632 3.5263 3.7895 4.0526 4.3158 4.5789 4.8421 5.1053 Columns 10 through 18 5.3684 5.6316 5.8947 6.1579 6.4211 6.6842 6.9474 7.2105 7.4737 Columns 19 through 20 7.7368 8.0000 b2=1:0.3:6.9b2 = Columns 1 through 9 1.0000 1.3000 1.6000 1.9000 2.2000 2.5000 2.8000 3.1000 3.4000 Columns 10 through 18 3.7000 4.0000 4.3000 4.6000 4.9000 5.2000 5.5000 5.8000 6.1000 Columns 19 through 20 6.4000 6.7000 b3=1,2,3,4;2,2,3,4;3,2,3,4;4,2,3,4b3 = 1 2 3 4 2 2 3 4 3 2 3 4 4 2 3 4 pians = 3.1416 format long pians = 3.141592653589793 a1_s=sqrt(a1)a1_s = 2.236067977499790 a2_a=abs(a2)a2_a = 5.830951894845301 who Your variables are:a1 a1_s a2 a2_a ans b1 b2 b3 whos Name Size Bytes Class Attributes a1 1x1 8 double a1_s 1x1 8 double a2 1x1 16 double complex a2_a 1x1 8 double ans 1x1 8 double b1 1x2
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025江苏盐城工业职业技术学院招聘专职辅导员6人模拟试卷含答案详解
- 2025年河北邯郸市教育局春季市直学校选聘博硕人才300名模拟试卷附答案详解(考试直接用)
- 三个人合伙开店协议书
- 网络协议书代理
- Z世代消费趋势解读:2025年新消费品牌如何拓展年轻用户群体报告
- 共同房产协议书怎么写
- 未领证离婚协议书样板
- 2025年新能源品牌建设与生态市场推广策略研究报告
- 2025年新能源行业企业新能源行业企业可持续发展报告
- 2025年电力系统安全稳定运行报告:技术创新与投资战略规划
- 政府人员网络安全培训课件
- GB/T 45906.8-2025变电站二次系统第8部分:电气操作防误
- CRT2000 消防控制室图形显示装置-使用说明书-V1.0
- B级英语词汇表修改版
- 2024年山西省成考(专升本)大学政治考试真题含解析
- 最高法院第一巡回法庭关于行政审判法律适用若干问题的会议纪要
- 足球场的运营可行性方案
- GB/T 2881-2023工业硅
- 有限合伙份额质押合同完整版(包含质押登记公证手续)
- GB/T 43299-2023机动车玻璃电加热性能试验方法
- 马工程经济法学教学
评论
0/150
提交评论