How to extract the first row and first column of an array of matrix?
70 次查看(过去 30 天)
显示 更早的评论
I have an array of 10001 elements of which a 2x2 matrix is inside each element. How can I loop thru the array and extract the first row, first column of each matrix?
Will appreciate your feedback.
4 个评论
Stephen23
2017-11-16
编辑:Stephen23
2017-11-16
@Mr. NailGuy: your array description is wildly inaccurate. The screenshot clearly shows that your array has size 2x2x10001, which means that it actually has 40004 elements.
You might like to consider revising basic MATLAB terminology, if you want to communicate effectively with regular MATLAB users.
采纳的回答
更多回答(1 个)
KL
2017-11-16
Use squeeze,
all_first_elements = squeeze(your_matrix(1,1,:));
now, plot like you normally do,
plot(all_first_elements)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!