-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
- MATLAB R2020b+ or GNU Octave 7+
-
C compiler (optional but recommended for 3-50x performance boost):
-
macOS: Xcode Command Line Tools (
xcode-select --install) -
Linux: GCC (
sudo apt-get install build-essentialon Ubuntu/Debian) - Windows: MSVC (included with Visual Studio 2017+) or MinGW
-
macOS: Xcode Command Line Tools (
- No MATLAB toolboxes required — FastSense is pure MATLAB/Octave
- Linux (x86_64, ARM64)
- macOS (Intel x86_64, Apple Silicon ARM64)
- Windows (x86_64, native or WSL)
| Component | Minimum Version | Notes |
|---|---|---|
| MATLAB | R2020b | Named arguments, categorical arrays |
| Octave | 7.0 | GUI toolkit (qt), handle class support |
| Python (WebBridge only) | 3.11+ | FastAPI, Uvicorn, async support |
% Coming soon: matlab.codeexchange or File Exchange
% For now, use Method 2 (Source)# Coming soon: brew install fastsense% Install from Octave Forge (coming soon)
pkg install -forge fastsensegit clone https://github.com/HanSur94/FastSense.git
cd FastSense% In MATLAB or Octave
install;This script:
- Adds all library paths to
path - Attempts MEX compilation if C compiler is detected
- Verifies all core classes are accessible
- Performs JIT warmup on first plot
Manual path setup (alternative):
addpath(genpath('/path/to/FastSense/libs'));
addpath(genpath('/path/to/FastSense/examples'));
addpath(genpath('/path/to/FastSense/tests'));docker build -t fastsense:latest .
docker run -it fastsense:latest /bin/bashdocker run --rm fastsense:latest octave --eval "install; example_basic"FastSense includes optional C MEX implementations with SIMD intrinsics for high-performance downsampling and threshold detection. MEX is optional—pure-MATLAB fallbacks are always available.
install; % Run once to set paths
cd libs/FastSense
build_mex;Output:
Compiling binary_search_mex.c (x86_64, AVX2)...
Compiling minmax_core_mex.c (x86_64, AVX2)...
Compiling lttb_core_mex.c (x86_64, AVX2)...
Compiling violation_cull_mex.c (x86_64, AVX2)...
MEX build complete. 4/4 files compiled successfully.
| Error | Solution |
|---|---|
| "mex: command not found" | Install a C compiler (see Prerequisites) |
| "Warning: SIMD disabled (AVX2 not supported)" | Normal on older CPUs—MEX will use SSE2 or scalar fallback |
| "Error: MEX compilation failed" | Check compiler: mex -setup (MATLAB) or mkoctfile --version (Octave) |
| MEX file crashes during runtime | Try build_mex clean and rebuild; file a bug report |
% Check which MEX files are compiled
ls libs/FastSense/private/*.mexa64 % Linux
ls libs/FastSense/private/*.mexmaci64 % macOS Intel
ls libs/FastSense/private/*.mexw64 % Windows
ls libs/FastSense/private/*.so % Octave on Linux
% If MEX files exist, they will be auto-detected and used
% If missing, pure-MATLAB fallbacks run automaticallyApproximate speedup over pure MATLAB (varies by data size and CPU):
| Function | Speedup | When Used |
|---|---|---|
binary_search_mex |
10–20x | Every zoom operation |
minmax_core_mex |
3–10x | First render + extreme zoom |
lttb_core_mex |
10–50x | First render + zoom |
violation_cull_mex |
5–15x | Threshold rendering |
On a 50M-point dataset: ~4.7s render with MEX vs. ~30s pure MATLAB.
install;
% Check that all key classes are accessible
which FastSense % Should return path to FastSense.m
which Sensor % Should return path to Sensor.m
which DashboardEngine % Should return path to DashboardEngine.m
which EventDetector % Should return path to EventDetector.mIf any which command returns "not found", the paths were not added correctly. Run install again.
install;
example_basic;You should see:
- A MATLAB figure with a plot of ~10M noisy sine wave points
- Red and orange dashed horizontal threshold lines
- Interactive zoom/pan with smooth performance
- Close the figure to exit
install;
addpath('tests');
run_all_tests;Expected output:
MATLAB Test Suite
Running TestAddLine ... OK
Running TestAddThreshold ... OK
...
=====================================
Passed: 247/250 | Failed: 3 | Skipped: 5
Note: A few tests may be skipped on Octave (those requiring PostSet listeners or App Designer) or fail if optional dependencies are missing.
install;
addpath('examples');
run_all_examples; % Runs all 80+ examples sequentiallyOr run a specific example:
example_dashboard; % Multi-tile dashboard
example_sensor_todisk; % Disk-backed 100M-point data
example_live_pipeline; % Real-time event detection% Compile and verify MEX files
build_mex;
% Check performance gain
benchmark_zoom; % Renders 10M points at 5 zoom levels% Persistent config (survives MATLAB restarts)
defaults = FastSenseDefaults();
defaults.ThemeName = 'dark'; % or 'light', 'industrial', 'scientific'
setdefaults(defaults);% Poll for new data every 2 seconds (default: 5)
d = DashboardEngine(...);
d.LiveInterval = 2;d.Verbose = true; % Prints progress and errors to consoleThis is a MATLAB license warning, not a FastSense issue. Ignore safely.
Use Xvfb (X virtual framebuffer):
xvfb-run -a octave --eval "install; example_basic"Use disk-backed storage:
s = Sensor('X', X, 'Y', Y);
s.toDisk(); % Automatically uses SQLite storageCheck MEX file architecture matches your MATLAB:
computer % Check: GLNXA64 (Linux), MACI64 (Intel Mac), etc.
ls libs/FastSense/private/*mexa64 % Should match architectureRestart MATLAB/Octave completely (not just clear all).
- Quick Start: Read the Getting Started Guide
- API Reference: Browse FastSense API, Dashboard API, Sensors API
- Live Mode: See Live Mode Guide for real-time data monitoring
- Dashboard: Build interactive dashboards with Dashboard Engine Guide
- Examples: Explore 80+ working examples
- Bug Reports: GitHub Issues
- Discussions: GitHub Discussions
- Wiki: Full Documentation
FastSense Wiki
API Reference
Guides
Use Cases
Internals
Resources