Skip to content

alexclymo/random-matlab-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚒️ Random MATLAB Tools

This repository collects small, self-contained MATLAB functions, scripts, and mini‑projects that I’ve found useful in research and day‑to‑day coding. Each tool lives in its own subfolder with a clean, ready‑to‑use version.

📂 Repository Structure

Each tool is in its own subfolder and includes its main function/script plus a minimal test/demo.

📋 Current Tools

1) Discretised Bivariate Normal CDF — ./discretizeBivarNormalCDF

Discretising the probability mass of a bivariate normal distribution over a rectangular grid.

Highlights

  • Single vectorised CDF table + 2D inclusion–exclusion for speed and stability.
  • Per-dimension control of grid size and ±σ range (nPoints=[n1;n2], nStd=[s1;s2]).

2) Sampling from N-dimensional discrete PMF — ./samplePMF

Function to draw a random sample from an arbitrary N-dimensional discrete distribution.

Highlights

  • Arbitrary number of dimensions handled via inputting grid using cells.
  • Sampling done via call to linear index using idx = discretize(u, edges).

📄 License

MIT License — free to use, modify, and share. Please retain license notices in derived work.

About

Matlab functions or scripts I have written that might be useful for other projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages