image thumbnail


version 2.0 (62.2 KB) by Rik
Matlab and Octave interface to the SQLite engine.


Updated 03 Jul 2020

From GitHub

View license on GitHub

This function is a wrapper for mex interfaces that were compiled for most operating systems, and for both Matlab and Octave. All Matlab releases from R14SP3 (v7.1) and later should work. Octave mex files can be compiled from the source, which is downloaded by this function itself.
Matlab releases older than R14SP3 on Windows (and R2011a on Ubuntu) will use a command line interface (CLI), which imposes several restrictions on syntax and may yield inconsistent results. If the SQL statement returns output, the raw output from the system call is sent as the second output argument to allow custom parsing.
Note that only the non-CLI Matlab implementations support char values outside of the 0-255 range. If you plan on using Octave or Matlab 6.5 you should make sure the input is valid. Input and output are not sanitized to reflect this, in case it does work as expected.

A use demo is included.

The Matlab interface is actually mksqlite version 2.5, see SourceForge for the compiled binaries included:
The Octave mex files included were compiled from the files listed in the help text. The files can be downloaded from
The CLI (command line interface) is in the file on For the precise URL of the capture to the Wayback Machine, see the get_CLI_handle sub-function.

Logo adapted from

Licence: CC by-nc-sa 4.0

Cite As

Rik (2021). sqlite3 (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with R13SP1 and later releases
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.