当前位置:网站首页>matlab习题 —— 创建 50 行 50 列全零矩阵、全 1 矩阵、单位矩阵、对角矩阵,输出矩阵第135号元素。
matlab习题 —— 创建 50 行 50 列全零矩阵、全 1 矩阵、单位矩阵、对角矩阵,输出矩阵第135号元素。
2022-06-27 10:57:00 【繁依Fanyi】
matlab系列文章:目录
一、题目
创建 50 行 50 列全零矩阵、全 1 矩阵、单位矩阵、对角矩阵,输出矩阵第 135 号元素。
二、解答
1. 创建 50 行 50 列全 0 矩阵
>> m1 = zeros(50) %创建全0矩阵
>>
>> disp(m1(135)) %显示135号元素
2. 创建 50 行 50 列全 1 矩阵
>> m2 = ones(50) %创建全1矩阵
>>
>> disp(m2(135)) %显示135号元素
3. 创建 50 行 50 列单位矩阵
>> m3 = eye(50) %创建对角矩阵
>>
>> disp(m3(135)) %显示135号元素
4. 创建 50 行 50 列对角矩阵
>> v = ones(300,1) %创建全1向量
>>
>> m4 = diag(v) %创建对角矩阵
>>
>> disp(m4(135)) %显示135号元素
边栏推荐
- Leetcode 729. 我的日程安排表 I(牛逼,已解决)
- Exception in Chinese character fuzzy query of MySQL database
- 【TcaplusDB知识库】TcaplusDB OMS业务人员权限介绍
- Naacl 2022 | TAMT: search the transportable Bert subnet through downstream task independent mask training
- NAACL 2022 | TAMT:通过下游任务无关掩码训练搜索可迁移的BERT子网络
- VPT Model Video Explanation
- JS client storage
- 【TcaplusDB知识库】TcaplusDB分析型文本导出介绍
- [tcapulusdb knowledge base] Introduction to tcapulusdb analytical text export
- One copy ten, CVPR oral is accused of plagiarizing a lot
猜你喜欢
21:第三章:开发通行证服务:4:进一步完善【发送短信,接口】;(在【发送短信,接口】中,调用阿里云短信服务和redis服务;一种设计思想:BaseController;)
File name setting causes an error to be written to writelines: oserror: [errno 22] invalid argument
Write it down once Net analysis of a property management background service stuck
go-zero微服务实战系列(七、请求量这么高该如何优化)
嵌入式软件架构设计-模块化
audiotrack与audioflinger
居家办公竟比去公司上班还累? | 社区征文
NVME2.0协议——新特性
What is the experience of telecommuting in a foreign company| Community essay solicitation
Codeforces Round #786 (Div. 3) ABCDE
随机推荐
Leetcode 729. 我的日程安排表 I(提供一种思路)
【Methodot 专题】什么样的低代码平台更适合开发者?
21:第三章:开发通行证服务:4:进一步完善【发送短信,接口】;(在【发送短信,接口】中,调用阿里云短信服务和redis服务;一种设计思想:BaseController;)
【TcaplusDB知识库】TcaplusDB常规单据介绍
JS file upload and download
嵌入式软件架构设计-模块化
[tcaplusdb knowledge base] Introduction to tcaplusdb tcaplusadmin tool
Learning notes - data set generation
TCP/IP 详解(第 2 版) 笔记 / 3 链路层 / 3.4 桥接器与交换机 / 3.4.1 生成树协议(Spanning Tree Protocol (STP))
Institute of Microbiology, Chinese Academy of Sciences recruited 20 young PI, with a resettlement fee of 2million yuan and a start-up fund of 10million yuan (long-term effective)
信息学奥赛一本通 1332:【例2-1】周末舞会
【TcaplusDB知识库】Tmonitor系统升级介绍
Quelles sont les fonctions de base nécessaires au développement d'applications de commerce électronique en direct? Quelles sont les perspectives d'avenir?
Leetcode 729. My schedule I (provides an idea)
中科院微生物所招聘青年PI 20比特,2百萬安家費,千萬啟動經費(長期有效)
Queue, two-way queue, and its application
Oracle multi table query
Uniform Asymptotics by Alexei
Leetcode 729. 我的日程安排表 I(牛逼,已解决)
政策关注 | 加快构建数据基础制度,维护国家数据安全