没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
1
MATLAB_AND_MATHS__GDUFS__Baiyi Wu
MATLAB and
Baiyi Wu
Guangdong University of Foreign Studies
Numerical Experiments
2
MATLAB_AND_MATHS__GDUFS__Baiyi Wu
Chapter 2:
Vectors and Matrices
3
MATLAB_AND_MATHS__GDUFS__Baiyi Wu
Vectors and Matrices
Vectors and matrices are used to store sets of values,
all of which are the same type.
Row Vectors
>> v = [1 2 3 4]
v =
1 2 3 4
>> v = [1,2,3,4]
v =
1 2 3 4
4
MATLAB_AND_MATHS__GDUFS__Baiyi Wu
Vectors and Matrices
Row Vectors
>> vec = 1:5
vec =
1 2 3 4 5
The Colon Operator and Linspace Function
>> nv = 1:2:9
nv =
1 3 5 7 9
>> ???????????????
vec =
9 7 5 3 1
>> ls = linspace(3,15,5)
ls =
3 6 9 12 15
>> logspace(1,5,5)
ans =
10 100 1000 10000 100000
>> newvec = [nv ls]
newvec =
1 3 5 7 9 3 6 9 12 15
>> linspace(1, 1.2, 4)
ans =
???????????????????????????????????
5
MATLAB_AND_MATHS__GDUFS__Baiyi Wu
Vectors and Matrices
Row Vectors
Referring to and Modifying Elements
>> newvec = [nv ls]
newvec =
1 3 5 7 9 3 6 9 12 15
The elements in a vector are
numbered sequentially;
each element number is called the
index, or subscript.
In MATLAB, the indices start at 1.
>> newvec(5)
ans =
9
>> b = newvec(4:6)
b =
7 9 3
>> newvec([1 10 5])
ans =
1 15 9
>> b(2) = 11
b =
7 11 3
>> b(6) = 12
b = ???????
>> b(7)
?????????
剩余27页未读,继续阅读
资源评论
Mmnnnbb123
- 粉丝: 670
- 资源: 8万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- March 2024 Expiration Of The OAM Out Of The Box Certificates
- 二叉搜索树迭代器(java代码).docx
- 解决keil MDK 5.38版本 在Debug配置使用STlink调试时软件闪退的问题
- py小项目:用户登录和注册系统开发欢迎图片
- TCCEE-x64-v6.2.3(9.51)
- 准考证.pdf.lnk
- 动态内存分配 实验设计.cpp
- 使用STM32F103C8T6+L298N+MG513P30电机使用外部中断法和输入捕获法进行编码器测速
- python入门python-Day25.rar
- python入门python-Day24.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功