haibaraxx的个人博客分享 http://blog.sciencenet.cn/u/haibaraxx

博文

Matlab: add lines in a matrix

已有 1742 次阅读 2016-4-22 02:42 |个人分类:Matlab|系统分类:科研笔记| add, lines

Syntax: A=[1,2;3,4;5,6;7,8]

Output: A=  1  2

                  3  4

                  5  6

                  7  8


Syntax:  B=[9,10]

Output:  B= 9  10


Syntax: C=[A(1:2,:); B; A(3:end,:)]  % The row vector, B, is then inserted between the 2nd and 3rd row of the matrix A.

Output: C = 1  2

                  3  4

                  9  10

                  5  6

                  7  8




https://blog.sciencenet.cn/blog-3031432-971805.html

上一篇:Multispectral VS Hyperspectral imagery
下一篇:Matlab: merge arrays
收藏 IP: 134.1.1.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-9-28 07:22

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部