How to extract the first row and first column of an array of matrix?
25 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mr. NailGuy
el 16 de Nov. de 2017
Comentada: Mr. NailGuy
el 16 de Nov. de 2017
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 comentarios
Stephen23
el 16 de Nov. de 2017
Editada: Stephen23
el 16 de Nov. de 2017
@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.
Respuesta aceptada
Más respuestas (1)
KL
el 16 de Nov. de 2017
Use squeeze,
all_first_elements = squeeze(your_matrix(1,1,:));
now, plot like you normally do,
plot(all_first_elements)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!