sdrforengineers / code Goto Github PK
View Code? Open in Web Editor NEWMATLAB implementations for SDR for Engineers textbook
Home Page: http://sdrforengineers.com/
License: MIT License
MATLAB implementations for SDR for Engineers textbook
Home Page: http://sdrforengineers.com/
License: MIT License
In chapter4.m vec2mat is used, but that is now depreciated. Matlab recommends using reshape instead. The easiest solution is to replace vec2mat with reshape(arr, [], numcols)
The function SetPlotSize
and SetPlotFont
used in the code is undefined, they are used in the following list of files:
chapter.m
chapter2.m
chapter3.m
chapter4.m
chapter5.m
chapter6.m
psk.m
robin.m
sfdr_test.m
simulated_DAC.m
time-alias.m
updownsample.m
I am using MatLab R2018a, I'll update this issue with any undefined or missing functions found in the examples as I come across them.
I'm unsure if this is intentional or not. The supporting text does not mention what is supposed to happen to zeroes.
Assuming the purpose of the source encoding is to just replace strings of 1s with a number representing the length of said strings, then the zero preceding the string is erroneously removed from the encoded message (in reality that zero's position is used for the string length value). As a result, a binary message starting "01101110..." and a binary message starting "1101110..." both encode to decimal message "2,3,...".
Given that source encoding is meant to be a unique mapping from one domain to another, the example code gives rise to a non-unique mapping, where by "2,3" is not uniquely decode-able back to the original binary message.
I would have assumed that the zeroes have to be left well alone(?) and therefore the above messages should encode to "0, 2, 0, 3,..." and "2, 0, 3, 0,..." respectively.
If that assumption is correct, then adding:
if (enc_msg1(end) == 0)
enc_msg1 = [enc_msg1 0];
endif
between lines 81 and 82, and 90 and 91 should resolve the issue; preserving all zeroes in the encoded message EDIT: remembering to ammend the variables numbers accordingly....
Example code is Code 4.2, in file chapter4.m
I ran the following code modified from template3.m.
framesToCollect = 1000;
frameSize = 2^15;
rx = sdrrx('Pluto');
rx.SamplesPerFrame = 2^15;
rx.CenterFrequency = 430e6;
%% Template 3
% Perform stream processing
sa3 = dsp.SpectrumAnalyzer;
sa3.SampleRate = 1e6;
framesToCollect = 1000;
% Process each frame immediately
for frame = 1:framesToCollect
[d,valid,of] = rx();
% Process data without overflow and is valid
if ~valid
warning('Data invalid')
else
if of
warning('Overflow occurred')
end
sa3(d); % Algorithm processing
end
end
But I got an overflow warning.
>> template_3
## Establishing connection to hardware. This process can take several seconds.
Warning: Overflow occurred
> In template_3 (line 20)
I cant think of why an overflow might occur. My frameSize and sampling rate tally. Might someone be able to tell why?
Hi,
I was looking for some implementation of Schmidl-cox and I bumped onto this book and pluto-SDR and its really amazing.
I was trying to run the code and guess have a dependency on getOFDMPreambleAndPilot function. What toolbox do I need in order to successfully run all the codes on this git? Or Do I need to implement this on my own ?
Ashish
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.