I tested the matlab LimeSDR driver (https://github.com/jocover/Simulink-MATLAB-LimeSDR) in MATLAB 2017b on Win7 x64. It functionally works but has some issues. These are what I found:
If LO is set to 2450MHz, the received samples become a real vector rather than complex one. I am not sure if my code is OK so I attached it.
It seems the matlab driver interface does not provide overflow/underflow indication. I cannot judge whether the waveform is successfully transfered between LimeSDR and host PC.
As an workaround solution to issue 2, I use a CW signal transmitted from signal generator to LimeSDR, and calculate the phase difference between samples, It should be as expected according the the CW frequency, LO frequency, and the sample rate.
As an example, I set the LO to 1GHz, CW to 1.001111GHz, 20MHz sample rate. The phase difference should be around 20 degrees. You can see from the below figure (3rd line) it is as expected.
When I set the CW to 1.002222GHz, 40MHz sample rate. The phase difference should still be around 20 degrees. However, the phase difference begin to “jump”. And If I set to 50MSPS, the phase jump is more obvious.
% (1) Open a device handle:
dev = limeSDR(); % Open device
% (2) Setup device parameters. These may be changed while the device
% is actively streaming.
dev.rx0.frequency = 1000e6; % when set to 2450e6, samples are real, not complex.
dev.rx0.samplerate = 40e6; % when set to 40e6, 50e6, overflow may occur.
dev.rx0.gain = 60;
dev.rx0.antenna = 1;
% (3) Enable stream parameters. These may NOT be changed while the device
% is streaming.
% (4) Start the module
% (5) Receive samples on RX0 channel
Duration = 1e-3; % in second.
numSample = ceil(Duration*dev.rx0.samplerate);
for idxLoop = 1:10
samples = dev.receive(numSample,0);
% samples(100) = ; % manually make some overflow
% (6) Cleanup and shutdown by stopping the RX stream and having MATLAB
% delete the handle object.
function  = plotWaveform(waveform, SampleRate)
% time domain waveform
% amplitude-phase domain
phaseDegree = rad2deg(phase(waveform));
phaseDiff = phaseDegree(2:end) - phaseDegree(1:end-1);
meanPhaseDiff = mean(phaseDiff);
stdPhaseDiff = std(phaseDiff);
rangePhaseDiff = max(phaseDiff)-min(phaseDiff);
str = sprintf('Mean=%.1f, STD=%.2f, Range=%.1 degree',meanPhaseDiff, stdPhaseDiff, rangePhaseDiff);
ylabel('Phase difference (degree)')
% freq domain waveform
NumSample = length(waveform);
FullScale = 1;
plot((0:NumSample-1)*SampleRate/NumSample, mag2db(abs((fft(waveform/NumSample/FullScale)))) )