How do we extract a 2D matrix out of a 2D matrix?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a 2D matrix of 600x1000 and I want to create a nested loop to extract 51x51 matrix data. How can we do that? Thanks.
0 comentarios
Respuestas (1)
Walter Roberson
el 12 de Nov. de 2019
for row_index = 1 : number_of_rows_to_transfer
for column_index = 1 : number_of_columns_to_transfer
TheOutputArray(row_index, column_index) = TheInputArray(row_index+row_offset, column_index+column_offset);
end
end
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!