Shared MATLAB functions used across multiple wireless communications simulation projects. This repository is designed to be included as a git submodule in each project repository.
| Function | Purpose |
|---|---|
mysql_login.m |
Connect to MySQL using this machine's locally-configured credentials (auto-provisions the database if it doesn't exist) |
get_mysql_credentials.m |
First-run interactive setup - detects a local MySQL server and caches credentials in a git-ignored mysql_local.json |
mysql_load.m |
Fetch rows from MySQL by param_hash |
mysql_write.m |
Insert/update with weighted-averaged metric merging (optional mutex) |
mysql_check.m |
Read flag from system_flags table |
mysql_set.m / mysql_unset.m |
Set/clear inter-process flags |
connectWithRetry.m |
Retry DB connection up to 50 times with 30s wait |
addMysqlJarOnce.m |
Add MySQL JDBC JAR to Java classpath once |
local_write.m |
Excel read/write fallback with weighted-averaging |
| Function | Purpose |
|---|---|
jsonencode_sorted.m |
Deterministic JSON encoding + SHA-256 hash (field names sorted alphabetically) |
DataHash.m |
Third-party SHA-256/MD5 utility (Jan Simon) |
| Function | Purpose |
|---|---|
gen_table.m |
Display results as a MATLAB table in the console |
updateProgressBar.m |
Braille-character progress bar with system parameter display |
| Function | Purpose |
|---|---|
profile_select.m |
Interactive console menu for profile selection |
figure_settings.m |
Interactive console prompt for figure rendering settings |
No credentials are stored in this repository. The first time a project enables MySQL storage, mysql_login.m walks you through a one-time setup:
- It checks whether a MySQL server is running on
localhost:3306. - If found, it asks for that server's password (assumes the
rootuser). - If not found, it asks for a remote host to connect to instead - or you can just press Enter to skip and use local Excel storage only.
- Once a connection succeeds, the credentials are cached in
mysql_local.jsonat the consuming project's root (already covered by.gitignore- never committed) and reused silently on every run after that. - The target database schema (e.g.
comm_database) is created automatically if it doesn't already exist.
To reconfigure (e.g. a new password), delete mysql_local.json and re-run.
This repository is not meant to be used standalone. Each project that depends on these functions should add this repo as a git submodule:
git clone --recurse-submodules https://github.com/JRW-lab/Common-Wireless-Infrastructure.gitOr add to an existing project:
cd /path/to/project
git submodule add https://github.com/JRW-lab/Common-Wireless-Infrastructure.git Common-Wireless-InfrastructureThen in MATLAB, add the submodule to your path:
addpath('Common-Wireless-Infrastructure/Meta Functions');Each project repo pins a specific commit of this shared infrastructure via .gitmodules. To update all projects to the latest shared code:
cd Common-Wireless-Infrastructure
git pull origin main
cd ..
git add Common-Wireless-Infrastructure
git commit -m "Update shared infrastructure to latest"- MATLAB R2024b or later
- Database Toolbox (for MySQL functions)
- Parallel Computing Toolbox (for
parforprogress reporting) mysql-connector-j-8.4.0.jar(JDBC driver, included in project repos)
For questions, contact jrwimer@uark.edu or visit my website.