Skip to content

MatlabOctaveSupport

Nicholas Corgan edited this page Sep 11, 2022 · 3 revisions

Matlab/Octave bindings for SoapySDR


If you've stumbled upon this page, this is referring to in-progress development, and the information within can change at any point before release.

See this branch.


The Matlab and Octave SoapySDR bindings use the MEX interface to provide a common API, allowing scripts to be used for both programs. The API is largely based on that of the C++ API, with some extensions added to provide a more familiar user experience. Overloaded functions are separated, with each function matching the corresponding C API function name.

Deviations from this policy are documented below.

Dependencies

Matlab

TODO

Octave

  • Any recent version should be fine. Development was done with Octave 5.2.0 and 7.2.0.
  • The Octave installation must include the octave-config and mkoctfile programs.

Ubuntu

sudo apt install liboctave-dev

OS X

brew install octave

Changes for Matlab/Octave API

Passing in options

TODO

Streaming

TODO

Basic example

% Enumerate devices
results = SoapySDR_Device.enumerate();
for result = results
    disp(result);
end

% Create device instance.
% Args can be user-defined or from the enumeration result. (TODO: actually support this)
sdr = SoapySDR_Device("driver", "rtlsdr");

% Query device info.
printf("Antennas:\n");
for antenna = sdr.listAntennas(SoapySDR_Direction.Rx, 0)
    printf(" * %s\n", antenna);
end

% TODO: finish

More examples

TODO

Clone this wiki locally