Extract and Join Matrix

Create new matrix with extracting Non-zero submatrix.
0 download
Aggiornato 20 mar 2021

Visualizza la licenza

This code extracts submatrix ~= 0
and creates new matrix combining subs.

dataMat =
0 0 0 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 3 3 3 0 0
0 1 1 1 0 0 0 3 3 3 0 0
0 0 0 0 0 0 0 3 3 3 0 0
0 0 2 2 2 0 0 0 0 0 0 0
0 0 2 2 2 0 0 0 4 4 4 0
0 0 2 2 2 0 0 0 4 4 4 0
0 0 0 0 0 0 0 0 4 4 4 0

|
V

resultMat =
1 1 1 3 3 3
1 1 1 3 3 3
1 1 1 3 3 3
2 2 2 4 4 4
2 2 2 4 4 4
2 2 2 4 4 4

Cita come

Hernia Baby (2024). Extract and Join Matrix (https://www.mathworks.com/matlabcentral/fileexchange/89017-extract-and-join-matrix), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2021a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.1

fixed code a little bit

1.0.0