版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1、选择题 1) 下列变量中 是合法的。 A. Char_l, i, j *y, C. Xy, al234 D. end, lbcd 2) 下列 C是合法的常量。 A. 3el0B. le500 C.D. 10-2 3) x=uint8,则x所占的字节是 D 个。 A. 1 B. 2 C. 4 D. 8 C.计算a每行的平均值数组增加一列平均值 4)已知x=0: 10,则x有 B个元素。 A. 9 B. 10C. 11D 12 5)产生对角线元素全为1其余为0的2X3矩阵的命令是 A. Ones 3) B. Ones (3, 2) C. Eye (2, 3) D. Eye (3, 2) 6)
2、a二 则a(:,end)是指 C A.所有元素 B.第一行元素C. 第三列元素D.第三行元素 7) a 3、 6 ,则运行 a(:,l)二 % 命令后 C 变成行向量B. a数组成2行2列 C. a数组成3行2列D. a数组没 有元素 2 3、 8)a= 4 5 6 ,则运行命令mean (a)是 。 a =magic(3) %by wl c=a,b %by wl d=a;b %by wl a = 816 3 57 4 92 b=eye(3) % by wl b = 100 010 001 c = d = 8 16 Columns 1 through 535? 492 8 16 1 0 1 0
3、 0 3 5 70 1 0 1 0 4920 0 0 0 1 Column 6 d(end;) %by wl 0ans = 0 0 0 1 6.矩阵a二4 diag、triu 和 tril 进行 8 9. 操作。并求其转置、秩、逆矩阵、矩阵的行列式值及三次幕。 a=reshape(1:9,3,3); % by wl a=a* a = 123 4 5 6 7 89 a=reshape(1:9,3,3); % by wl a=a* %by wl a = 123 4 5 6 7 89 fliplr(a) % by wl ans = 321 654 987 rot90(a) %by wl ans =
4、258 147 diag(a) %by wl a triu(a) %by wl a % by w( ans = 123 056 009 tril(a) %by wl ans 二 1 47 2 58 3 69 rank(a) %by wl ans = 2 ans = 1 0 0 4 5 0 7 8 9 inv(a) %by wl Warning: Matrix is close to singular or badly scaled Results may be inaccurate. RCOND = 1.541976e-018. ans = a=1 3;5 8; % by wl a* %by
5、wl det(a) %by wl ans = 6.6613e-016 a3 1.0e+01G 04504 0.9007 -0.4504 0 90D7 -1 80140 9007 -0.4504 0.9007 -0.4504 ans = 468576 10621305 16562034 3 % by wl 684 1548 2412 ans = 468576684 106213051648 165620342412 2召一 3x2 + x3 + 2x4 = 8 8 解线性方程组 X + 3x2 +x4 =6 x-x2+ x3 + 8x4 = 7 lx + 3兀2 2小 + 2x4 = 5 A=2
6、 -3 1 2;1 3 0 1;1 -1 1 8;7 1 -2 2 %by wl 2-312 1301 1 1 8 71-22 b=8;6;7;5 % by wl 8 6 7 5 x=inv(Afb %by wl 2.5353 1.2033 6.8299 -0.1462 9.输入字符串变量a为,hen。,将其每个字符后移4个,如h,变为 1,然后再逆丿子存入变量b。 a-hello*; % by wl b=char(fliplr(double(a)+4) % by wl b = sppil 10计算函数/(0 = 10f2r-sin(4/),其中t范围为0到20,步长为,g (t)为 f (t
7、)大于0的部分,计算g (t)的值。 t =0:0.2:20; %by wl f =10*exp(2*t)-sin(4*t) %by wl 1.0e+018* Columns 1 through 6 0.0000 0.0000 0.0000 Columns 7 through 12 0.0000 0.0000 0.0000 Columns 13 through 18 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 19 through 24 0.0000 0.
8、0000 0.0000 0.0000 0.0000 0.0000 Columns 25 through 30 0.0000 0.0000 0.0000 Columns 31 through 36 0.0000 0.0000 0.0000 Columns 37 through 42 0.0000 0.0000 0.0000 Columns 43 through 48 0.0000 0.0000 0.0000 Columns 49 through 54 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0
9、000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 55 through 60 0.0000 0.0000 0.0000 Columns 61 through 66 0.0000 0.0000 0.0000 Columns 67 through 72 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 73 through 78 0.0000 0.0000 0.0001 0.0001 0.000
10、2 0.0002 Columns 79 through 84 0.0004 0.0005 0.0008 0.0012 0.0018 0.0026 Columns 85 through 90 0.0039 0.0058 0.0087 0.0130 0.0194 0.0289 Columns 91 through 96 0.04310.0643 0.0959 0.1431 0.2135 0.3186 Columns 97 through 101 0.4752 0.7090 1.0577 1.5778 2.3539 f1=f(f=0) %by wl f1 = 1.0e+018* Columns 1
11、through 6 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 7 through 12 0.0000 0.0000 0.0000 Columns 13 through 18 0.0000 0.0000 0.0000 Columns 19 through 24 0.0000 0.0000 0.0000 Columns 25 through 30 0.0000 0.0000 0.0000 Columns 31 through 36 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
12、 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 37 through 42 0.0000 0.0000 0.0000 Columns 43 through 48 0.0000 0.0000 0.0000 Columns 49 through 54 0.0000 0.0000 0.0000 Columns 55 through 60 0.0000 0.0000 0.0000 Columns 61 through 66 0.0000 0.0000 0.0000 0.0000 0.0000
13、0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 67 through 72 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 Columns 73 through 78 0.0000 0.0000 0.0001 Columns 79 through 84 0.0004 0.0005 0.0008 Columns 85 through 90 0.0039 0.0058 0.0087 Columns 91 through 96 0.04310.0643 0.0959 Columns 97 through 101 0.4752 0.70901.0577 0.0001 0.0002 0.0002 0.0012 0.0018 0.0026 0.0130 0.0194 0.0289 0.1431 0.2135 0.3186 1.5778
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 内蒙古杭锦旗城镇初级中学2026届初三年级模拟考试生物试题试卷含解析
- 2026年玄武岩材料耐腐蚀性能使后期防腐成本降低80%经济性测算
- 2026年波罗的海干散货指数与全球原材料贸易跟踪
- 2025年临床医学阶段测试试卷
- 软件公司客服部门负责人面试问题与技巧
- 日化产品市场推广岗位应聘全攻略
- 企业并购法务专员的面试问题与技巧
- 区块链技术原理及应用案例
- 会议议程范本
- 互联网公司软件工程师面试宝典
- 2025中国国新招聘笔试参考题库附带答案详解
- 2026法律基础常识试题及答案
- 2025年幼儿园初级保育员证考试试题和答案
- 航空航天飞控系统设计手册
- 2026年福建省烟草专卖局第二批招聘(127人)考试参考试题及答案解析
- - 育才中学2026学年春季第二学期初二年级地理实践活动与知识应用教学工作计划
- 2026年永州职业技术学院高职单招职业适应性测试模拟试题带答案解析
- 肥胖课件之针灸治疗
- “十五五规划纲要”解读:双碳引领绿色发展
- 建筑施工安全管理细则范本
- 海信集团AI面试求职者常见疑惑解答
评论
0/150
提交评论