开发者

Accessing the last few rows of a matrix using matlab

开发者 https://www.devze.com 2023-01-15 09:26 出处:网络
How can I view (or access) the last 10 rows of a matrix? Note that the matrix size (i.e., the number of rows) is changing: rows= 50开发者_Python百科, 100 150...You can use the end operator to see the

How can I view (or access) the last 10 rows of a matrix?

Note that the matrix size (i.e., the number of rows) is changing: rows= 50开发者_Python百科, 100 150...


You can use the end operator to see the last ten rows, like such:

array(end-9:end,:)

This shows rows from 'last one'-9 (e.g. from 41 if there's 50 rows) till the last row (e.g. 50), and all columns.

0

精彩评论

暂无评论...
验证码 换一张
取 消