Stratified matrix sampling

Versione 1.0.0 (1,77 KB) da Jan Motl
Random matrix sampling, which is stratified by rows and columns
67 download
Aggiornato 9 lug 2019

Visualizza la licenza

We can easily sample a matrix with rand() function. However, this sampling is sometimes too random - we may end up with rows or columns without any sample and "screw" the downstream code. The canonical solution to this problem is to use stratified sampling. This function implements stratification by both, rows and columns, for a rectangular matrix.

The sampling is without replacement (each field in the matrix can be selected at most once). And we have to provide the count of samples that we want to select.

The function does not use rejection sampling and is reasonably fast (~twice as slow as rand()).

Cita come

Jan Motl (2024). Stratified matrix sampling (https://www.mathworks.com/matlabcentral/fileexchange/72097-stratified-matrix-sampling), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2018a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Propagation and Channel Models in Help Center e MATLAB Answers

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.0