Given a matrix, how can I slice a matrix given the input parameters are the number of rows and number of columns? See example.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
function [result3Dmatrix] = imgCut(origImgMatrix, numRows, numCols )
For example if matrix is origImgMatrix = [2 4 6 8
9 2 3 4
1 4 9 8
3 9 1 4 ];
And numRows = 2 and numCols = 2. The matrix will be split into 2 rows and 2 columns.
result3Dmatrix will output 4 matrices:
1) 2)
2 4 6 8
9 2 3 4
3) 4)
1 4 9 8
3 9 1 4
0 Commenti
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!