plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | michaelheiniger/sdr-epfl-master | my_sufficientstatistics.m | .m | sdr-epfl-master/midterms/old/midterm_prep/lab2/code/my_sufficientstatistics.m | 809 | utf_8 | 788869ec8ad739f50868e4d13d2a74d1 | % MY_SUFFICIENTSTATISTICS Processes the output of the channel to generate
% sufficient statistics about the transmitted symbols.
% X = MY_SUFICIENTSTATISTICS(R, H, USF) produces sufficient statistics
% about the transmitted symbols, given the signal received in vector R,
% the impulse response H of the basic pulse (tra... |
github | michaelheiniger/sdr-epfl-master | my_symbols2samples.m | .m | sdr-epfl-master/midterms/old/midterm_prep/lab2/code/my_symbols2samples.m | 548 | utf_8 | 37feb16d17b1445db53f9d961b472cef | % MY_SYMBOLS2SAMPLES Produces the samples of the modulated signal
% Z = MY_SYMBOLS2SAMPLES(Y, H, USF) produces the samples of a
% modulated pulse train. The sampled pulse is given in vector H,
% and the symbols modulating the pulse are contained in vector Y.
% USF is the upsampling factor, i.e., the number of samples p... |
github | michaelheiniger/sdr-epfl-master | tfplot.m | .m | sdr-epfl-master/midterms/old/midterm_prep/lab1/code/tfplot.m | 1,987 | utf_8 | 653e96405631febc6e69d9099a509444 | % TFPLOT Time and frequency plot
% TFPLOT(S, FS, NAME, PLOTTITLE) displays a figure window with two subplots.
% Above, the signal S is plotted in time domain, with the x-axis
% labeled in seconds. The sampling frequency is FS.
% Below, the absolute value of the signal in the frequency domain, with the
% ... |
github | michaelheiniger/sdr-epfl-master | my_mapper.m | .m | sdr-epfl-master/midterms/old/midterm_2014/p3/my_mapper.m | 1,103 | utf_8 | 3bda5eb8257c72019cd126d0862f629c | % function [symbols, constellation] = my_mapper(bits, M).
% It maps a sequence of bits into a sequence of symbols taking values in a M -QAM constellation.
% It returns the symbol sequence and the constellation.
% Specifically, it shall carry out the following tasks:
%
% (i) Check if the input M is the square of an i... |
github | michaelheiniger/sdr-epfl-master | my_demapper.m | .m | sdr-epfl-master/midterms/old/midterm_2014/p3/my_demapper.m | 515 | utf_8 | d6bf9d673f0717793a2a504c72e4575d | % function [estim_tx_bits] = my_demapper(r,constellation).
% It finds the maximum likelihood symbol sequence that corresponds to the received (noisy) sequence
% r and it outputs the corresponding bit sequence
function [estim_tx_bits] = my_demapper(r,constellation)
% r is column-vector
r = transpose(r);
r_repeat = ... |
github | michaelheiniger/sdr-epfl-master | my_img2bit.m | .m | sdr-epfl-master/midterms/old/midterm_2014/p3/my_img2bit.m | 251 | utf_8 | 85eb50057bf997b864a417e9a481a547 | % function [bits] = my_img2bit(img_name).
% It converts an image to a sequence of bits.
function [bits] = my_img2bit(img_name)
img = imread(img_name);
img_column = img(:);
bits = de2bi(img_column, 16);
bits = transpose(bits);
bits = bits(:);
end |
github | michaelheiniger/sdr-epfl-master | satCode.m | .m | sdr-epfl-master/midterms/old/midterm_2015/p3/code/satCode.m | 1,160 | utf_8 | c62637f4d0ef5c0fae5fc95423b96f53 | % SATCODE Returns C/A code sequence
% C = SATCODE(S) returns the C/A code sequence of satellite S as a row
% vector, sampled at chip rate. The elements of C are in the set {-1, 1}.
% C = SATCODE(S, 'fs') returns the C/A code sequence at the sampling rate
% rather than at the chip rate.
% $Id: satCode.... |
github | michaelheiniger/sdr-epfl-master | gpsConfig.m | .m | sdr-epfl-master/midterms/old/midterm_2015/p3/code/gpsConfig.m | 4,520 | utf_8 | f4f08d8661b704eea02d494690ae4696 | % GPS_CONFIG Initialize GPS configuration parameters
% GPS_CONFIG() defines all GPS configuration options (constants, etc)
% and sets them in the structure 'gpsc'.
% GPS_CONFIG must be called only once, before 'gpsc' is accessed for the
% first time. Any function that subsequently uses 'gpsc' must decla... |
github | michaelheiniger/sdr-epfl-master | getData.m | .m | sdr-epfl-master/midterms/old/midterm_2015/p3/code/getData.m | 6,496 | utf_8 | f31a5473dff9338fb36d4d58572dcfd2 | % GET_DATA Access stored GPS samples
% X = GET_DATA(A,B) returns a vector containing GPS samples, starting at
% index A and ending at index B. The length of the returned vector is
% thus B - A + 1.
% $Id: getData.m 1383 2011-12-19 15:04:40Z tarniceriu $
function x = getData(a, b)
global gpsc; ... |
github | michaelheiniger/sdr-epfl-master | satCode.m | .m | sdr-epfl-master/midterms/old/midterm_2015/p1/code/satCode.m | 1,160 | utf_8 | c62637f4d0ef5c0fae5fc95423b96f53 | % SATCODE Returns C/A code sequence
% C = SATCODE(S) returns the C/A code sequence of satellite S as a row
% vector, sampled at chip rate. The elements of C are in the set {-1, 1}.
% C = SATCODE(S, 'fs') returns the C/A code sequence at the sampling rate
% rather than at the chip rate.
% $Id: satCode.... |
github | michaelheiniger/sdr-epfl-master | n_tuple_output.m | .m | sdr-epfl-master/midterms/old/midterm_2015/p1/code/n_tuple_output.m | 812 | utf_8 | 2c381f681671e3c38e90260486523f70 | % complete the following code.
% nb: you find the needed routines in the same directory.
function y = n_tuple_output(sat,n_bits,doppler,tau_bit)
gpsConfig();
global gpsc;
% use getData to load exactly n_bits worth of samples, starting at tau_bit
r = getData(tau_bit,tau_bit+n_bits*gpsc.spb-1);
% set up a time vari... |
github | michaelheiniger/sdr-epfl-master | gpsConfig.m | .m | sdr-epfl-master/midterms/old/midterm_2015/p1/code/gpsConfig.m | 4,520 | utf_8 | f4f08d8661b704eea02d494690ae4696 | % GPS_CONFIG Initialize GPS configuration parameters
% GPS_CONFIG() defines all GPS configuration options (constants, etc)
% and sets them in the structure 'gpsc'.
% GPS_CONFIG must be called only once, before 'gpsc' is accessed for the
% first time. Any function that subsequently uses 'gpsc' must decla... |
github | michaelheiniger/sdr-epfl-master | getData.m | .m | sdr-epfl-master/midterms/old/midterm_2015/p1/code/getData.m | 6,496 | utf_8 | f31a5473dff9338fb36d4d58572dcfd2 | % GET_DATA Access stored GPS samples
% X = GET_DATA(A,B) returns a vector containing GPS samples, starting at
% index A and ending at index B. The length of the returned vector is
% thus B - A + 1.
% $Id: getData.m 1383 2011-12-19 15:04:40Z tarniceriu $
function x = getData(a, b)
global gpsc; ... |
github | michaelheiniger/sdr-epfl-master | satCode.m | .m | sdr-epfl-master/midterms/midterm_2012/p5/satCode.m | 1,152 | utf_8 | bc788af2bda6984e792f93ece7b0be95 | % SATCODE Returns C/A code sequence
% C = SATCODE(S) returns the C/A code sequence of satellite S as a row
% vector, sampled at chip rate. The elements of C are in the set {-1, 1}.
% C = SATCODE(S, 'fs') returns the C/A code sequence at the sampling rate
% rather than at the chip rate.
% $Id: satCode.... |
github | michaelheiniger/sdr-epfl-master | gpsConfig.m | .m | sdr-epfl-master/midterms/midterm_2012/p5/gpsConfig.m | 4,445 | utf_8 | f1db4dd6185c2da7c3b8a785da8f5c01 | % GPS_CONFIG Initialize GPS configuration parameters
% GPS_CONFIG() defines all GPS configuration options (constants, etc)
% and sets them in the structure 'gpsc'.
% GPS_CONFIG must be called only once, before 'gpsc' is accessed for the
% first time. Any function that subsequently uses 'gpsc' must decla... |
github | michaelheiniger/sdr-epfl-master | my_adjustDoppler.m | .m | sdr-epfl-master/Labs_GPS/decoding/my_adjustDoppler.m | 1,837 | utf_8 | 032f99d9c5028a6cb40d9bb37261d793 | % ADJUSTDOPPLER Tracks the evolution of the Doppler frequency
% NEWDOPPLER = ADJUSTDOPPLER(SAT_NUMBER, TAU, DOPPLER, FCORR)
% SAT_NUMBER selects the satellite we want to track, TAU is the
% current estimate of the sample corresponding to the beginning
% of the next unprocessed bit and DOPPLER is the current Doppler
% ... |
github | michaelheiniger/sdr-epfl-master | adjustTauAndDoppler.m | .m | sdr-epfl-master/Labs_GPS/decoding/adjustTauAndDoppler.m | 1,483 | utf_8 | d279fd667bd9855159f4ae778bc425cd | % ADJUSTTAUANDDOPPLER is called once in a while to update the estimates of tau and the Doppler
%
% [NEWTAU, NEWDOPPLER] = ADJUSTTAUANDDOPPLER(SAT_NUMBER, TAU, DOPPLER) will return
% the updated values NEWDOPPLER and the NEWTAU for the satellite SAT_NUMBER,
% based on a search around the initial values TAU AN... |
github | michaelheiniger/sdr-epfl-master | my_doInnerProductsBitByBit.m | .m | sdr-epfl-master/Labs_GPS/decoding/my_doInnerProductsBitByBit.m | 1,694 | utf_8 | 05352e28932792a8d60aaaf8ae0b9e11 | % DOINNERPRODUCTSBITBYBIT Does the inner product one bit at a time.
%
% [NEWBITWISEINNERPRODUCT, NEXTINITIALPHI] = DOINNERPRODUCTSBITBYBIT(NBITS,SAT_NUMBER,DOPPLER,TAU,INITIALPHI)
% Returns in NEWBITWISEINNERPRODUCT the inner products of NBITS (done one
% bit at a time) with repeated C/A code for satellite SAT_N... |
github | michaelheiniger/sdr-epfl-master | my_findFirstBit.m | .m | sdr-epfl-master/Labs_GPS/decoding/my_findFirstBit.m | 2,099 | utf_8 | f545b9428ee0966e5a5934b5e050834e | % FINDFIRSTBIT Scans the Doppler corrected data to locate the begining of a bit
% TAU = FINDFIRSTBIT(SAT_NUMBER,DOPPLER,TAU) reads the data starting
% at TAU (beginning of a C/A code as obtained by FINDSATELLITES()),
% corrects it for Doppler using the estimate DOPPLER, and uses the
% C/A code for satellite SAT_NUM... |
github | michaelheiniger/sdr-epfl-master | findSatellites.m | .m | sdr-epfl-master/Labs_GPS/decoding/findSatellites.m | 4,672 | utf_8 | aee0fe83472d0e7ecfa51706495b8ef4 | % FINDSAT Scans the data for the presence of satellites
% FINDSAT reads the data using the function GETDATA and saves in file
% foundSat.mat the relevant parameters for the satellites it finds.
% It actually saves four row vectors; each vector has as many elements as
% the number of visible satellites. The... |
github | michaelheiniger/sdr-epfl-master | my_fineEstimate.m | .m | sdr-epfl-master/Labs_GPS/decoding/my_fineEstimate.m | 2,620 | utf_8 | 837cff6692911b9c1765cb4432514e53 | % FINE_ESTIMATE Refine estimates of the Doppler shift in a GPS signal
% [DOPPLER_ESTIM_F,IP_RESULT]=FINE_ESTIMATE(SAT_NUMBER,TAU_ESTIM,
% DOPPLER_ESTIM_C,DOPPLER_STEP)
% Improve the estimation of the Doppler shift corresponding to
% satellite SAT_NUMBER doing a refined search around the coarse
% estimate DOPPLER_EST... |
github | michaelheiniger/sdr-epfl-master | my_adjustTau.m | .m | sdr-epfl-master/Labs_GPS/decoding/my_adjustTau.m | 1,369 | utf_8 | f423a77db7b59ead7bde7edd1caaf4a0 | % ADJUSTTAU Uses the current estimates of tau and Doppler to adjust tau
% NEWTAU = ADJUSTTAU(SAT_NUMBER, TAU, DELTATAU, DOPPLER)
% Integer SAT_NUMBER specifies the satellite we want to track
% TAU is the current estimate of the sample corresponding to the beginning
% of the next unprocessed bit
% DELTATAU is the range... |
github | michaelheiniger/sdr-epfl-master | satCode.m | .m | sdr-epfl-master/Labs_GPS/decoding/satCode.m | 1,230 | utf_8 | 5e2583fbaf7b72cf6941690801efe293 | % SATCODE Returns C/A code sequence
% C = SATCODE(S) returns the C/A code sequence of satellite S as a row
% vector, sampled at chip rate. The elements of C are in the set {-1, 1}.
% C = SATCODE(S, 'fs') returns the C/A code sequence at the sampling rate
% rather than at the chip rate.
% $Id: satCode.... |
github | michaelheiniger/sdr-epfl-master | my_coarseEstimate.m | .m | sdr-epfl-master/Labs_GPS/decoding/my_coarseEstimate.m | 4,896 | utf_8 | 38293eedfc9d6c2d7d92687e9d7a6841 | % COARSE_ESTIMATE Find coarse estimates of Doppler shift and delay in a GPS
% signal
% [DOPPLER_ESTIM,TAU_ESTIM,IP_RESULT]=COARSE_ESTIMATE(SAT_NUMBER,DOPPLER_STEP)
% Estimation is done correlating multiple repetitions (10 in our case) of
% the C/A code for satellite SAT_NUMBER with the received signal (to be
% read fro... |
github | michaelheiniger/sdr-epfl-master | gpsConfig.m | .m | sdr-epfl-master/Labs_GPS/decoding/gpsConfig.m | 4,539 | utf_8 | cb30bfd7338efa4683ffbc5d7fb55626 | % GPS_CONFIG Initialize GPS configuration parameters
% GPS_CONFIG() defines all GPS configuration options (constants, etc)
% and sets them in the structure 'gpsc'.
% GPS_CONFIG must be called only once, before 'gpsc' is accessed for the
% first time. Any function that subsequently uses 'gpsc' must decla... |
github | michaelheiniger/sdr-epfl-master | decodeSatellites.m | .m | sdr-epfl-master/Labs_GPS/decoding/decodeSatellites.m | 7,642 | utf_8 | b18213e73503a7b5849c42e8c2ac199d | % DECODESATELLITES Obtains the bits transmitted by the visible satellites
%
% DECODESATELLITES() will read file "foundSat.mat" (created by FINDSATELLITES())
% to retrieve the list of visible satellites and their relevant parameters
% (where the fist C/A code starts and the Doppler shifts), and will decode
... |
github | michaelheiniger/sdr-epfl-master | my_innerProductsToBits.m | .m | sdr-epfl-master/Labs_GPS/decoding/my_innerProductsToBits.m | 1,578 | utf_8 | a74049310c0bff51017ff03a21c2ab4f | % INNERPRODUCTSTOBITS Make hard decisions about the transmitted bits
% DECODEDBITS = INNERPRODUCTSTOBITS(BITWISEINNERPRODUCTRESULTS)
% Returns in DECODEDBITS a vector of the same dimensions as
% BITWISEINNERPRODUCTS with the hard decisions about the transmitted bits.
% The elements of DECODEDBITS are 1 or -1
func... |
github | michaelheiniger/sdr-epfl-master | getData.m | .m | sdr-epfl-master/Labs_GPS/decoding/getData.m | 6,518 | utf_8 | 13e00c9c842cdb6ccf0f80a620d0ba34 | % GET_DATA Access stored GPS samples
% X = GET_DATA(A,B) returns a vector containing GPS samples, starting at
% index A and ending at index B. The length of the returned vector is
% thus B - A.
% Note: A >= 1
% $Id: getData.m 1383 2011-12-19 15:04:40Z tarniceriu $
function x = getData(a, b)
g... |
github | michaelheiniger/sdr-epfl-master | my_adjustDoppler.m | .m | sdr-epfl-master/Labs_GPS/hw6_solutions/my_adjustDoppler.m | 3,527 | utf_8 | 38c875a86d1a147f7758c7da3dbec4ba | % ADJUSTDOPPLER Tracks the evolution of the Doppler frequency
% NEWDOPPLER = ADJUSTDOPPLER(SAT_NUMBER, TAU, DOPPLER, FCORR)
% SAT_NUMBER selects the satellite we want to track, TAU is the
% current estimate of the sample corresponding to the beginning
% of the next unprocessed bit and DOPPLER is the current Doppler
% ... |
github | michaelheiniger/sdr-epfl-master | my_doInnerProductsBitByBit.m | .m | sdr-epfl-master/Labs_GPS/hw6_solutions/my_doInnerProductsBitByBit.m | 2,388 | utf_8 | 30c6c5686f54bc800d2dfb3112fd0284 | % DOINNERPRODUCTSBITBYBIT Does the inner product one bit at a time.
%
% [NEWBITWISEINNERPRODUCT, NEXTINITIALPHI] = DOINNERPRODUCTSBITBYBIT(NBITS,SAT_NUMBER,DOPPLER,TAU,INITIALPHI)
% Returns in NEWBITWISEINNERPRODUCT the inner products of NBITS (done one
% bit at a time) with repeated C/A code for satellite SAT_N... |
github | michaelheiniger/sdr-epfl-master | my_findFirstBit.m | .m | sdr-epfl-master/Labs_GPS/hw6_solutions/my_findFirstBit.m | 2,479 | utf_8 | 6dce411c2d925872727679b8058e8fee | % FINDFIRSTBIT Scans the Doppler corrected data to locate the begining of a bit
% TAU = FINDFIRSTBIT(SAT_NUMBER,DOPPLER,TAU) reads the data starting
% at TAU (beginning of a C/A code as obtained by FINDSATELLITES()),
% corrects it for Doppler using the estimate DOPPLER, and uses the
% C/A code for satellite SAT_NUM... |
github | michaelheiniger/sdr-epfl-master | my_adjustTau.m | .m | sdr-epfl-master/Labs_GPS/hw6_solutions/my_adjustTau.m | 1,660 | utf_8 | 58cf08cb2f62ca68af781c5da7c2f1b3 | % ADJUSTTAU Uses the current estimates of tau and Doppler to adjust tau
% NEWTAU = ADJUSTTAU(SAT_NUMBER, TAU, DELTATAU, DOPPLER)
% Integer SAT_NUMBER specifies the satellite we want to track
% TAU is the current estimate of the sample corresponding to the beginning
% of the next unprocessed bit
% DELTATAU is the range... |
github | michaelheiniger/sdr-epfl-master | my_innerProductsToBits.m | .m | sdr-epfl-master/Labs_GPS/hw6_solutions/my_innerProductsToBits.m | 2,455 | utf_8 | 2f5d67653dbfe2e6c832e84abdd2c310 | % INNERPRODUCTSTOBITS Make hard decisions about the transmitted bits
% DECODEDBITS = INNERPRODUCTSTOBITS(BITWISEINNERPRODUCTRESULTS)
% Returns in DECODEDBITS a vector of the same dimensions as
% BITWISEINNERPRODUCTS with the hard decisions about the transmitted bits.
% The elements of DECODEDBITS are 1 or -1
fu... |
github | michaelheiniger/sdr-epfl-master | my_demodulator.m | .m | sdr-epfl-master/Lab2/code/my_demodulator.m | 1,100 | utf_8 | badc4a7e63e878874c090e40a9b3210b | function [ Z ] = my_demodulator( Y, MAP )
% MY_DEMODULATOR Minimum distance slicer
% Z = MY_DEMODULATOR(Y, MAP) demodulates vector Y
% by finding the element of the specified constellation that is
% closest to each element of input Y. Y contains the outputs of
% the matched filter of the receiver, and it can be a row o... |
github | michaelheiniger/sdr-epfl-master | my_bi2de.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_bi2de.m | 1,579 | utf_8 | 993b25183416dd501cacaf8cda7d1993 | % MY_BI2DE Convert binary vectors to decimal numbers
% D = MY_BI2DE(B) converts a binary vector B to a decimal value D. When
% B is a matrix, the conversion is performed row-wise and the output D
% is a column vector of decimal values. The default orientation of the
% binary input is Right-MSB: the first el... |
github | michaelheiniger/sdr-epfl-master | my_de2bi.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_de2bi.m | 3,901 | utf_8 | 5cd2f2241a2b9941c31964293a1f33f7 | % MY_DE2BI Convert decimal numbers to binary numbers
% B = MY_DE2BI(D) converts a vector D of nonnegative integers from base 10
% to a binary matrix B. Each row of the binary matrix B corresponds to one
% element of D. The default orientation of the binary output is
% Right-MSB, i.e., the first element in a row of B r... |
github | michaelheiniger/sdr-epfl-master | my_pskmap.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_pskmap.m | 449 | utf_8 | effaa4af7396cba716147d9307000a0c | % MY_PSKMAP Create constellation for Phase Shift Keying modulation
% C = MY_PSKMAP(M) outputs a 1xM vector with the complex symbols
% of the PSK constellation of alphabet size M, where M is an integer power of 2
function c = my_pskmap(M)
% Verify that M is an integer power of two
if (log2(M) ~= fix(log2(M)))
erro... |
github | michaelheiniger/sdr-epfl-master | my_qammap.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_qammap.m | 748 | utf_8 | f3b3062773a16738d2854da51afdb3ec | % MY_QAMMAP Create constellation for square QAM modulations
% C = MY_QAMMAP(M) outputs a 1xM vector with the
% constellation for the quadrature amplitude modulation of
% alphabet size M, where M is the square of an integer power
% of 2 (e.g. 4, 16, 64, ...).
% The signal constellation is a square constellation.
functi... |
github | michaelheiniger/sdr-epfl-master | my_modulator.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_modulator.m | 1,585 | utf_8 | ff15ff31fe8c3a7923f5d7df64917c00 | % MY_MODULATOR Maps a vector of M-ary integers to constellation points
% Y = MY_MODULATOR(X, MAPPING) outputs a vector of (possibly complex)
% symbols from the constellation specified as second parameter,
% corresponding to the integer valued symbols of X.
% Input X can be a row or column vector, and output Y has the s... |
github | michaelheiniger/sdr-epfl-master | my_demodulator.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_demodulator.m | 2,480 | utf_8 | c0c620cee99add1e58f2e35e359742e4 | % MY_DEMODULATOR Minimum distance slicer
% Z = MY_DEMODULATOR(Y, MAPPING) demodulates vector Y
% by finding the element of the specified constellation that is
% closest to each element of input Y. Y contains the outputs of
% the matched filter of the receiver, and it can be a row or
% column vector. MAPPING specifies t... |
github | michaelheiniger/sdr-epfl-master | my_sufficientstatistics.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_sufficientstatistics.m | 1,133 | utf_8 | c2312841270975ddeb723c5211c52cb1 | % MY_SUFFICIENTSTATISTICS Process the output of the channel to generate
% sufficient statistics about the transmitted symbols.
% X = MY_SUFICIENTSTATISTICS(R, H, USF) produces sufficient statistics
% about the transmitted symbols, given the signal received in vector R,
% the impulse response H of the basic pulse (tran... |
github | michaelheiniger/sdr-epfl-master | my_symbols2samples.m | .m | sdr-epfl-master/Lab2/lab_solutions/my_symbols2samples.m | 1,045 | utf_8 | 9ed4db67991de6930fdc5f5ac6e5713b | % MY_SYMBOLS2SAMPLES Produces the samples of the modulated signal
% Z = MY_SYMBOLS2SAMPLES(Y, H, USF) produces the samples of a
% modulated pulse train. The sampled pulse is given in vector H,
% and the symbols modulating the pulse are contained in vector Y.
% USF is the upsampling factor, i.e., the relationship betwee... |
github | michaelheiniger/sdr-epfl-master | my_makeh.m | .m | sdr-epfl-master/ldpc_decoder/my_makeh.m | 1,686 | utf_8 | ea54f115294255fd7ec1354c24ac1f61 | % MAKEH Create a binary sparse parity check matrix for an LDPC code
% starting from its column description
% H = MAKEH(Hcols) returns a sparse matrix H for an LDPC code.
% The input matrix Hcols describes the locations of the 1s of H;
% more specifically, the fist row of Hcols lists the position of
% the 1s o... |
github | michaelheiniger/sdr-epfl-master | my_bi2de.m | .m | sdr-epfl-master/ldpc_decoder/my_bi2de.m | 1,533 | utf_8 | 44c93f0adbfa6a17e7825144bbdc9950 | % MY_BI2DE Convert binary vectors to decimal numbers
% D = MY_BI2DE(B) converts a binary vector B to a decimal value D. When
% B is a matrix, the conversion is performed row-wise and the output D
% is a column vector of decimal values. The default orientation of the
% binary input is Right-MSB: the first el... |
github | michaelheiniger/sdr-epfl-master | my_de2bi.m | .m | sdr-epfl-master/ldpc_decoder/my_de2bi.m | 3,918 | utf_8 | f44086dc921f1d97b3445993d672e2d3 | % MY_DE2BI Convert decimal numbers to binary numbers
% B = MY_DE2BI(D) converts a vector D of nonnegative integers from base 10
% to a binary matrix B. Each row of the binary matrix B corresponds to one
% element of D. The default orientation of the binary output is
% Right-MSB, i.e., the first element in a row of B r... |
github | michaelheiniger/sdr-epfl-master | my_generateDecodingMatrices.m | .m | sdr-epfl-master/ldpc_decoder/my_generateDecodingMatrices.m | 1,337 | utf_8 | 359d6daac8ad952661789d8825beb0b0 | % function [SOCKET, MCT, MVT] = generateDecodingMatrices(H)
% This function computes the three matrices SOCKET, MCT and MVT
% starting from the parity check matrix H according to the following
% description:
% Input matrix H has dimensions M x N, where M is the number of check
% nodes and N is the number of variable no... |
github | michaelheiniger/sdr-epfl-master | bits2img.m | .m | sdr-epfl-master/ldpc_decoder/bits2img.m | 896 | utf_8 | 68df69b1c8fe921e643b92129b02695d | % BITS2IMG Converts a vector of bits to an image
% X = BITS2IMG(S, B, M, N) returns an M x N matrix X whose entries
% are of type UINT8 that is obtained by reconstructing the image from
% the bit sequence S. B is the number of bits per pixel, and M and N
% are the height and width of the image, respectively... |
github | michaelheiniger/sdr-epfl-master | img2bits.m | .m | sdr-epfl-master/ldpc_decoder/img2bits.m | 1,263 | utf_8 | a8fe40dfb79267d534f217497f0c5b00 | % IMG2BITS Converts an image to a sequence of bits
% S = IMG2BITS(X, B) returns a row vector S that is obtained by
% serializing the image matrix X column by column and then converting
% each value to its binary representation. The conversion to bits is
% 'right-msb'. The number of bits per pixel is given b... |
github | michaelheiniger/sdr-epfl-master | my_ldpcencoder.m | .m | sdr-epfl-master/ldpc_decoder/my_ldpcencoder.m | 3,393 | utf_8 | 3dc712c9a8e716a4b36c4430b378072f | % LDPCENCODE Encoder for binary LDPC codes
% CW = LDPCENCODE(S, H) encodes the information bit vector S
% according to the code specified by the parity check matrix H.
% H is an m x n binary sparse matrix, and S is the input vector
% (n-m bits) CW is the output codeword (vector of n bits).
%
% The algorithm fo... |
github | michaelheiniger/sdr-epfl-master | my_ldpcdecoder.m | .m | sdr-epfl-master/ldpc_decoder/my_ldpcdecoder.m | 3,927 | utf_8 | c4113cc1a24ba3ca3554d88deb1b781a | function llrout = sol_ldpcdecoder(llr0, numiter, H)
% LDPCDECODER Decode LDPC-encoded bit sequence
% LLROUT = LDPCDECODER(LLR0, NUMITER, H) performs decoding of an
% LDPC-encoded bit sequence using the sum-product algorithm on the
% code graph. LLR0 is a vector containing the initial log-
% likelihood ratios of the va... |
github | michaelheiniger/sdr-epfl-master | my_extractmatrices.m | .m | sdr-epfl-master/ldpc_decoder/my_extractmatrices.m | 1,330 | utf_8 | 4008f6449424a95f1f24eed9783b3662 | % EXTRACTMATRICES Extract submatrices from a sparse matrix for LPDC
% encoding
% [A, B, C, D, E, T, g, m, n] = EXTRACTMATRICES(H) returns
% submatrices A-E, T, as defined in "Efficient Encoding of
% Low-Density Parity Check Codes" (Richardson and Urbanke, 2001).
% The variables g, m, n contain the dimensions of the var... |
github | michaelheiniger/sdr-epfl-master | imgreduce.m | .m | sdr-epfl-master/ldpc_decoder/imgreduce.m | 1,263 | utf_8 | 8256b2f0c865e28a1d1bb7c2c757ec00 | % IMGREDUCE Reduces image size and grayscale resolution
% Y = IMGREDUCE(X, G, B) reduces the grayscale image X by
% downsampling the image by a factor G and by reducing the grayscale
% resolution to B bits per pixel.
% X is an m x n matrix where m and n are the height and the width of
% the image, respe... |
github | michaelheiniger/sdr-epfl-master | test_convenc.m | .m | sdr-epfl-master/ldpc_decoder/test_convenc.m | 1,781 | utf_8 | 93c54a166f12d589f3e996cbc996ee9a | % [UNCODED_BER, CODED_BER] = TEST_CONVENC(IMAGE_FILE, Es_sigma2)
%
% TEST_CONVENC compares the BER and 'image quality' of the transmission of
% the image with name IMAGE_FILE over an AWGN, with and without convolutional
% coding (constraint length 4, generator polynomial [5 7]);
% BPSK modulation is used, and Es_sigm... |
github | michaelheiniger/sdr-epfl-master | transmit_bpsk.m | .m | sdr-epfl-master/ldpc_decoder/transmit_bpsk.m | 1,328 | utf_8 | aaba3718dfd9e17f58598b6308fd43d6 | % TRANSMIT_BPSK Simulate BPSK transmission across AWGN channel
% [S_EST, BER] = TRANSMIT_BPSK(S, Es_sigma2) simulates the
% transmission of the bit sequence S across an additive white
% Gaussian noise channel using BPSK modulation.
% S is a vector (row or column) with the bits to be transmitted.
% Es_sig... |
github | michaelheiniger/sdr-epfl-master | transmit_convenc_coded_bpsk.m | .m | sdr-epfl-master/ldpc_decoder/transmit_convenc_coded_bpsk.m | 2,756 | utf_8 | 6724aa88fbddc3e1e987bbf2616b33a5 | % TRANSMIT_CODED_BPSK Simulate convolutionally encoded BPSK transmission
% across the AWGN channel
%
% [S_EST, BER] = TRANSMIT_CODED_BPSK(S, Es_sigma2) simulates the
% transmission of the bit sequence S across an additive white
% Gaussian noise channel using convolutional coding and BPSK modulation.
% Th... |
github | michaelheiniger/sdr-epfl-master | ecef2wgs84.m | .m | sdr-epfl-master/Lab_GPS_3/gps_receiver_position/position/ecef2wgs84.m | 1,348 | utf_8 | 810a87a28806d65b78e0bfd414391fc9 | function [long lat h] = ecef2wgs84(x, y, z)
% ECEF2WGS84 Computes the user position in ellipsoid coordinates
% [LAT LONG H] = ECEF2WGS84(X, Y, Z) accepts the position of the user
% (receiver) in the ECEF coordinate system and uses the WGS-84 model to
% compute the corresponding latitude (LAT), longitude (LONG)... |
github | michaelheiniger/sdr-epfl-master | my_satpos.m | .m | sdr-epfl-master/Lab_GPS_3/gps_receiver_position/position/my_satpos.m | 3,044 | utf_8 | 9691a3aaa495937068da16836cb23f66 |
function [sp] = my_satpos(ephdata, t)
% SATPOS Compute satellite position in ECEF coordinate system
% [SP, DELTA_T_S] = SATPOS(EPHDATA, T) returns the position of the satellite
% SP at GPS time T.
% Computations use multiple parameters available in the ephemeris structure
% EPHDATA;
%
% The position SP... |
github | michaelheiniger/sdr-epfl-master | my_rcvrpos.m | .m | sdr-epfl-master/Lab_GPS_3/gps_receiver_position/position/my_rcvrpos.m | 6,305 | utf_8 | a9b98a9165f2aa6c519ab3748da57228 | function [lat, long, h] = my_rcvrpos(sat)
% RCVRPOS Compute GPS receiver position in WGS84 coordinate system
% [LAT, LONG, H] = RCVRPOS(SAT) returns the latitude, longitude and
% altitude in the WGS-84 geodetic system of a GPS receiver. SAT is a
% vector of at least four satellite numbers whose data is to b... |
github | michaelheiniger/sdr-epfl-master | my_demodulator.m | .m | sdr-epfl-master/Lab3/code/my_demodulator.m | 1,100 | utf_8 | badc4a7e63e878874c090e40a9b3210b | function [ Z ] = my_demodulator( Y, MAP )
% MY_DEMODULATOR Minimum distance slicer
% Z = MY_DEMODULATOR(Y, MAP) demodulates vector Y
% by finding the element of the specified constellation that is
% closest to each element of input Y. Y contains the outputs of
% the matched filter of the receiver, and it can be a row o... |
github | michaelheiniger/sdr-epfl-master | err_rates_coded_uncoded.m | .m | sdr-epfl-master/Lab3/code/err_rates_coded_uncoded.m | 3,956 | utf_8 | cb87f6e577254a18150949bd4c3cf36a | % ERR_RATES_CODED_UNCODED Plots error rate vs. Es_N0 for coded and uncoded BPSK modulation
% [uncoded_BER, coded_BER] = ERR_RATES_CODED_UNCODED(NUM_BITS, Es_sigma2)
% simulates the transmission of a sequence of NUM_BITS bits over an AWGN
% channel using BPSK modulation, both uncoded and coded (with a convolut... |
github | michaelheiniger/sdr-epfl-master | my_qammap.m | .m | sdr-epfl-master/finals/final_2011/final_2011_code/ex_2/my_qammap.m | 864 | utf_8 | ac6ee16828f2675f46a07580ed65a89d | % MY_QAMMAP Create constellation for square QAM modulations
% C = MY_QAMMAP(M) outputs a 1xM vector with the
% constellation for the quadrature amplitude modulation of
% alphabet size M, where M is the square of an integer power
% of 2 (e.g. 4, 16, 64, ...).
% The signal constellation is a square constellation.
% $Id:... |
github | michaelheiniger/sdr-epfl-master | my_demodulator.m | .m | sdr-epfl-master/finals/final_2011/final_2011_code/ex_2/my_demodulator.m | 1,981 | utf_8 | 8e3041469294e593d0a07d8f950d57ea | % MY_DEMODULATOR Minimum distance slicer
% Z = MY_DEMODULATOR(Y, MAPPING) demodulates vector Y
% by finding the element of the specified constellation that is
% closest to each element of input Y. Y contains the outputs of
% the matched filter of the receiver, and it can be a row or
% column vector. MAPPING specifies t... |
github | michaelheiniger/sdr-epfl-master | channel_est4.m | .m | sdr-epfl-master/Lab4/solution/channel_est4.m | 628 | utf_8 | 91dbb369c41bb7b059c39b07010851fa |
function lambda = channel_est4(Rf, preamble_symbols)
% CHANNEL_EST4 Estimate the channel coefficients in the frequency domain
% There is no channel information available. The channel coefficients are
% computed as the ratio between the first received OFDM symbol and the
% preamble
% RF: matrix containing the recei... |
github | michaelheiniger/sdr-epfl-master | my_qammap.m | .m | sdr-epfl-master/Lab4/solution/my_qammap.m | 809 | utf_8 | c317acd6a814922a3e3b1102cbe781eb | % MY_QAMMAP Create constellation for square QAM modulations
% C = MY_QAMMAP(M) outputs a 1xM vector with the
% constellation for the quadrature amplitude modulation of
% alphabet size M, where M is the square of an integer power
% of 2 (e.g. 4, 16, 64, ...).
% The signal constellation is a square constellation.
funct... |
github | michaelheiniger/sdr-epfl-master | my_modulator.m | .m | sdr-epfl-master/Lab4/solution/my_modulator.m | 1,037 | utf_8 | 813ca520383d071b6263caa020065c66 | % MY_MODULATOR Maps a vector of M-ary integers to constellation points
% Y = MY_MODULATOR(X, MAPPING) outputs a vector of (possibly complex)
% symbols from the constellation specified as second parameter,
% corresponding to the integer valued symbols of X.
% Input X can be a row or column vector, and output Y has the s... |
github | michaelheiniger/sdr-epfl-master | my_demodulator.m | .m | sdr-epfl-master/Lab4/solution/my_demodulator.m | 1,921 | utf_8 | e787c69ee42b4dacc51f787e2eef9ed2 | % MY_DEMODULATOR Minimum distance slicer
% Z = MY_DEMODULATOR(Y, MAPPING) demodulates vector Y
% by finding the element of the specified constellation that is
% closest to each element of input Y. Y contains the outputs of
% the matched filter of the receiver, and it can be a row or
% column vector. MAPPING specifies t... |
github | michaelheiniger/sdr-epfl-master | channel_est4.m | .m | sdr-epfl-master/Lab4/code/channel_est4.m | 624 | utf_8 | 3f700480e21c211c136bccab291c0f77 |
function lambda = channel_est4(Rf, preamble_symbols)
% CHANNEL_EST4 Estimate the channel coefficients in the frequency domain
% There is no channel information available. The channel coefficients are
% computed as the ratio between the first received OFDM symbol and the
% preamble
% RF: matrix containing the recei... |
github | michaelheiniger/sdr-epfl-master | my_qammap.m | .m | sdr-epfl-master/Lab4/code/my_qammap.m | 809 | utf_8 | c317acd6a814922a3e3b1102cbe781eb | % MY_QAMMAP Create constellation for square QAM modulations
% C = MY_QAMMAP(M) outputs a 1xM vector with the
% constellation for the quadrature amplitude modulation of
% alphabet size M, where M is the square of an integer power
% of 2 (e.g. 4, 16, 64, ...).
% The signal constellation is a square constellation.
funct... |
github | michaelheiniger/sdr-epfl-master | my_modulator.m | .m | sdr-epfl-master/Lab4/code/my_modulator.m | 1,037 | utf_8 | 813ca520383d071b6263caa020065c66 | % MY_MODULATOR Maps a vector of M-ary integers to constellation points
% Y = MY_MODULATOR(X, MAPPING) outputs a vector of (possibly complex)
% symbols from the constellation specified as second parameter,
% corresponding to the integer valued symbols of X.
% Input X can be a row or column vector, and output Y has the s... |
github | michaelheiniger/sdr-epfl-master | my_demodulator.m | .m | sdr-epfl-master/Lab4/code/my_demodulator.m | 1,921 | utf_8 | e787c69ee42b4dacc51f787e2eef9ed2 | % MY_DEMODULATOR Minimum distance slicer
% Z = MY_DEMODULATOR(Y, MAPPING) demodulates vector Y
% by finding the element of the specified constellation that is
% closest to each element of input Y. Y contains the outputs of
% the matched filter of the receiver, and it can be a row or
% column vector. MAPPING specifies t... |
github | michaelheiniger/sdr-epfl-master | my_makeh.m | .m | sdr-epfl-master/LDPC_encoder/ldpc_encoder/my_makeh.m | 1,044 | utf_8 | 027a9d76c4adc6591a11b74fe0a6caf5 | % MAKEH Create a binary sparse parity check matrix for an LDPC code
% starting from its column description
% H = MAKEH(Hcols) returns a sparse matrix H for an LDPC code.
% The input matrix Hcols describes the locations of the 1s of H;
% more specifically, the fist row of Hcols lists the position of
% the 1s o... |
github | michaelheiniger/sdr-epfl-master | my_ldpcencoder.m | .m | sdr-epfl-master/LDPC_encoder/ldpc_encoder/my_ldpcencoder.m | 3,447 | utf_8 | c17bbbfee9cc71a4b6f1b0fea1cefe0e | % LDPCENCODE Encoder for binary LDPC codes
% CW = LDPCENCODE(S, H) encodes the information bit vector S
% according to the code specified by the parity check matrix H.
% H is an m x n binary sparse matrix, and S is the input vector
% (n-m bits) CW is the output codeword (vector of n bits).
%
% The algorithm fo... |
github | michaelheiniger/sdr-epfl-master | my_extractmatrices.m | .m | sdr-epfl-master/LDPC_encoder/ldpc_encoder/my_extractmatrices.m | 1,166 | utf_8 | 022b5f331bf0b2914a4706a174d3e8bf | % EXTRACTMATRICES Extract submatrices from a sparse matrix for LPDC
% encoding
% [A, B, C, D, E, T, g, m, n] = EXTRACTMATRICES(H) returns
% submatrices A-E, T, as defined in "Efficient Encoding of
% Low-Density Parity Check Codes" (Richardson and Urbanke, 2001).
% The variables g, m, n contain the dimensions of the var... |
github | michaelheiniger/sdr-epfl-master | my_bi2de.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/my_bi2de.m | 1,533 | utf_8 | 44c93f0adbfa6a17e7825144bbdc9950 | % MY_BI2DE Convert binary vectors to decimal numbers
% D = MY_BI2DE(B) converts a binary vector B to a decimal value D. When
% B is a matrix, the conversion is performed row-wise and the output D
% is a column vector of decimal values. The default orientation of the
% binary input is Right-MSB: the first el... |
github | michaelheiniger/sdr-epfl-master | my_de2bi.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/my_de2bi.m | 3,918 | utf_8 | f44086dc921f1d97b3445993d672e2d3 | % MY_DE2BI Convert decimal numbers to binary numbers
% B = MY_DE2BI(D) converts a vector D of nonnegative integers from base 10
% to a binary matrix B. Each row of the binary matrix B corresponds to one
% element of D. The default orientation of the binary output is
% Right-MSB, i.e., the first element in a row of B r... |
github | michaelheiniger/sdr-epfl-master | read_signed.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/read_signed.m | 639 | utf_8 | 9f4dc2185f60faeebddf3caba71eb63f | % READ_SIGNED Extracts data from a page using two's complement format
% X = READ_SIGNED(P, SF, A, N, S)
% Arguments:
% P Page (P is a 300x5 matrix of bits {0,1}, each column is a subframe)
% SF Subframe ID
% A Starting bit
% N Number of bits
% S Exponent of scaling factor (factor = 2^S)
%
% X = m ... |
github | michaelheiniger/sdr-epfl-master | read_2part_signed_c.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/read_2part_signed_c.m | 896 | utf_8 | 89925be79e08445a58252eadf4bebd88 | % READ_2PART_SIGNED Extracts data from a page when the data is stored in two different locations in two's complement format
% X = READ_2PART_SIGNED(P, SF, AM, NM, AL, NL, S)
% P page (P is a 300x5 matrix of bits {0,1})
% SF Subframe ID
% AM Starting bit (MSB part)
% NM Number of bits (MSB part)
% AL Sta... |
github | michaelheiniger/sdr-epfl-master | my_establishParity.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/my_establishParity.m | 2,883 | utf_8 | 9380dad8cfa8aad656a4b22542bd4d1b | % ESTABLISH_PARITY Checks the parity of the GPS subframes
% S = ESTABLISH_PARITY(WS) checks the parity of one or more
% subframes WS and flips the bits where necessary according to
% the GPS parity algorithm. If the parity check fails,
% a warning is issued; otherwise a message indicating success
% ... |
github | michaelheiniger/sdr-epfl-master | my_bits2subframes.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/my_bits2subframes.m | 1,392 | utf_8 | 815179a12dcfcfc692f6490d150446f8 | % BITS2SUBFRAMES Returns a matrix containing the subframes in the
% desired order
% [SUBFRAMES, SUBFRAMESIDS] = BITS2SUBFRAMES(BITS) returns the matrix
% SUBFRAMES having as its columns the subframes extracted from BITS.
% The IDs of the subframes are returned in SUBFRAMESIDS.
% BITS must be a row vector c... |
github | michaelheiniger/sdr-epfl-master | read_2part_unsigned.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/read_2part_unsigned.m | 785 | utf_8 | afc88366c4f5f0c0db33da864da93c89 | % READ_2PART_UNSIGNED Extracts data from a page when the data is stored in two different locations
% X = READ_2PART_UNSIGNED(P, SF, AM, NM, AL, NL, S)
% Arguments:
% P Page (P is a 300x5 matrix of bits {0,1})
% SF Subframe ID
% AM Starting bit (MSB part)
% NM Number of bits (MSB part)
% AL Starting bit ... |
github | michaelheiniger/sdr-epfl-master | readEphemeris.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/readEphemeris.m | 5,160 | utf_8 | 5e533b087ba418dceea20a2891396e89 | % READEPHEMERIS123 extracts the ephemeris data from subframes 1 to 3
% EPHDATA = READEPHEMERIS123(DATA) extracts the ephemeris data of subframes
% 1 to 3 from the given page by taking the correct bits and performing
% the appropriate conversion (scaling, 2-complement, etc.).
%
% DATA is a 300x3 matrix of zeros ... |
github | michaelheiniger/sdr-epfl-master | my_removeExcessBits.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/my_removeExcessBits.m | 2,201 | utf_8 | 6dc2768d3fd00fbe908ad4f325ab60ae | % REMOVEEXCESSBITS Extracts the complete subframes in the bit sequence obtained from a satellite
% [S, IDX] = REMOVEEXCESSBITS(BITS) detects the start of the first
% subframe in the row vector BITS (values in {-1,+1}) by correlating with
% the GPS preamble (stored in gpsc.preamble).
% If the negative of the ... |
github | michaelheiniger/sdr-epfl-master | mainProduceEphemerides.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/mainProduceEphemerides.m | 9,890 | utf_8 | cd3db79fe1979cc4546b6efc0ae8a507 | % MAINPRODUCEEPHEMERIDES Produces the ephemerides and pseudoranges for the visible satellites
% MAINPRODUCEEPHEMERIDES(SATELLITES) loops over the vector of integers
% SATELLITES, and processes the raw bits received from each of these
% visible satellites to extract the ephemeris data and compute the
% pseudorange
% For... |
github | michaelheiniger/sdr-epfl-master | getSubframes.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/getSubframes.m | 1,408 | utf_8 | 9b08a9a837997ab5db7078fea3a36f51 | % GETSUBFRAMES Extracts the subframes from the bit stream transmitted by a satellite
% [SUBFRAMESIDS, SUBFRAMES, IDX] = GETSUBFRAMES(BITS) takes the BITS of a satellite and
% returns in SUBFRAMES and SUBFRAMESIDS the subframes and their IDs
% respectivelly. In IDX the function returns the index into vector
% BITS... |
github | michaelheiniger/sdr-epfl-master | read_signed_c.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/read_signed_c.m | 686 | utf_8 | 5f38831badfc77b7fa26595fdb89bed4 | % READ_SIGNED Extracts data from a page using two's complement format
% X = READ_SIGNED(P, SF, A, N, S)
% Arguments:
% P Page (P is a 300x5 matrix of bits {0,1}, each column is a subframe)
% SF Subframe ID
% A Starting bit
% N Number of bits
% S Exponent of scaling factor (factor = 2^S)
%
% X = m ... |
github | michaelheiniger/sdr-epfl-master | gpsConfig.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/gpsConfig.m | 4,445 | utf_8 | f1db4dd6185c2da7c3b8a785da8f5c01 | % GPS_CONFIG Initialize GPS configuration parameters
% GPS_CONFIG() defines all GPS configuration options (constants, etc)
% and sets them in the structure 'gpsc'.
% GPS_CONFIG must be called only once, before 'gpsc' is accessed for the
% first time. Any function that subsequently uses 'gpsc' must decla... |
github | michaelheiniger/sdr-epfl-master | read_unsigned.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/read_unsigned.m | 499 | utf_8 | 3bbd4793d3b62e00fdcce21885c246a8 | % READ_UNSIGNED Extracts data from a page using unsigned format
% X = READ_UNSIGNED(P, SF, A, N, S)
% Arguments:
% P Page (P is a 300x5 matrix of bits {0,1})
% SF Subframe ID
% A Starting bit
% N Number of bits
% S Exponent of scaling factor (factor = 2^S)
%
% X = m * 2^S, where m is the mantissa r... |
github | michaelheiniger/sdr-epfl-master | read_2part_signed.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/read_2part_signed.m | 849 | utf_8 | bc95a804510dd12e3f45f936250243b4 | % READ_2PART_SIGNED Extracts data from a page when the data is stored in two different locations in two's complement format
% X = READ_2PART_SIGNED(P, SF, AM, NM, AL, NL, S)
% P page (P is a 300x5 matrix of bits {0,1})
% SF Subframe ID
% AM Starting bit (MSB part)
% NM Number of bits (MSB part)
% AL Sta... |
github | michaelheiniger/sdr-epfl-master | my_computePseudorange.m | .m | sdr-epfl-master/Lab_GPS_2/ephemerides/my_computePseudorange.m | 1,801 | utf_8 | 79f917476ca9a580ed28afb52df5b777 | % COMPUTEPSEUDORANGE Compute pseudorange for one GPS satellite
% PSEUDORANGE = COMPUTEPSEUDORANGE(TAUS, TAU_REF, TAU_FIRSTBITSUBFRAME)
% TAUS: vector of indices into the received samples where each decoded bit begins
% The length of TAUS is equal to the number of decoded bits
% TAU_REF: (scalar) index into the vecto... |
github | michaelheiniger/sdr-epfl-master | my_amdemod.m | .m | sdr-epfl-master/Lab1/code/my_amdemod.m | 770 | utf_8 | 96ce73114071f74f7e9fca76bcbbfdd1 | function m_normalized = my_amdemod(s, fc, fs)
%MY_AMDEMOD demodulates the provided AM-modulated signal.
% MY_AMDEMOD(S, FC, FS) demodulates the AM-modulated signal S.
% FC is the carrier frequency.
% FS is the sampling rate of the signal S.
A = 1;
K = 1;
filter_order = 2;
% Get the envelope of the signal
s_abs ... |
github | michaelheiniger/sdr-epfl-master | tfplot.m | .m | sdr-epfl-master/Lab1/lab_solutions/tfplot.m | 1,232 | utf_8 | 701e9fe06f5a69ff1318dde798e378ac | % TFPLOT Time and frequency plot
% TFPLOT(S, FS, NAME, TITLE) displays a figure window with two subplots.
% Above, the signal S is plotted in time domain; below, the signal is plotted
% in frequency domain. NAME is the "name" of the signal, e.g., if NAME is
% 's', then the labels on the y-axes will be 's(t)... |
github | michaelheiniger/sdr-epfl-master | my_amdemod.m | .m | sdr-epfl-master/Lab1/lab_solutions/my_amdemod.m | 957 | utf_8 | bf1c8a66edb4c45aa657b83afc798096 | % MY_AMDEMOD Demodulate AM signal
% M = MY_AMDEMOD(S, FC, FS) is the demodulation of an AM (amplitude
% modulation) signal at carrier frequency FC, sampled at FS. The
% returned signal is normalized to have values between -1 and 1.
function s_demod = my_amdemod(s, fc, fs)
N_ORDER = 2; % 8 for a better fil... |
github | michaelheiniger/sdr-epfl-master | my_ammod.m | .m | sdr-epfl-master/Lab1/lab_solutions/my_ammod.m | 689 | utf_8 | a8beded1856c00887c4d38df81b5169b | % MY_AMMOD Performs amplitude modulation
% S = MY_AMMOD(M, K, A, Fc, Fs) is an amplitude modulated signal of the
% message signal M(t), where Fs is the sampling frequency of the message
% signal and Fc is the desired carrier frequency. The modulation is
% performed as follows:
% S = A * (1 + K*M(t)) *... |
github | ijindal/Noisy_Dropout_regularization-master | dnn_mnist_init.m | .m | Noisy_Dropout_regularization-master/dnn_mnist_init.m | 4,019 | utf_8 | 94088cb36b794346995831c7c26737fd | function net = dnn_mnist_init(varargin)
% CNN_MNIST_LENET Initialize a CNN similar for MNIST
opts.batchNormalization = true ;
opts.networkType = 'simplenn' ;
opts = vl_argparse(opts, varargin) ;
rng('default');
rng(0) ;
f=1/100 ;
net.layers = {} ;
net.layers{end+1} = struct('type', 'conv', ...
... |
github | jmerkow/I2I-master | classification_demo.m | .m | I2I-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | mbonakda/nw-opt-master | subspace_CG.m | .m | nw-opt-master/subspace_CG.m | 1,567 | utf_8 | 36336de49b05e16f051df2b9a1cb357d | % Author: Matt Bonakdarpour
% Description:
% - Implements Projected CG method
% - Nocedal & Wright, Algo 16.2
function [ x_cg ] = subspace_CG(x_c, l, u, G, b)
N = size(x_c, 1);
active_constraint_idx = find((abs(x_c-l) < 1e-3) + (abs(x_c-u) < 1e-3));
I = eye(N);
% preconditioning
% inac... |
github | mbonakda/nw-opt-master | trust_region_newtonCG.m | .m | nw-opt-master/trust_region_newtonCG.m | 3,265 | utf_8 | f2d390111639cfe6c03b42f9bf26c044 | % Author: Matt Bonakdarpour
% Description:
% - Implements Trust-region Newton-CG Method (Steihaug)
% - See Algorithm 7.2 in Nocedal & Wright
function [x_out, numCalls, num_cg_iters, gradNorms] = trust_region_newtonCG( x_in, delta_max, fncHandle )
delta = 1e-2; % initial trust region radius
eta = 0.25... |
github | mbonakda/nw-opt-master | simplex.m | .m | nw-opt-master/simplex.m | 1,961 | utf_8 | 0e3aabe579bf7402d03b622a179d63e7 | % Author: Matt Bonakdarpour
% Description:
% - Implements simplex method using the 2-phrase strategy outlined in Nocedal & Wright (Ch. 13)
% - Solves following problem:
% min c'x s.t. Ax=b, x >= 0
function [ts,xs] = simplex(A, b, c)
simplexStart = tic;
m = size(A, 1)
% construct phase 1 prob... |
github | mbonakda/nw-opt-master | dogleg_trustRegion.m | .m | nw-opt-master/dogleg_trustRegion.m | 2,683 | utf_8 | 5b913bd64ae3f85d87a4165ab3ef15d5 | % Author: Matt Bonakdarpour
% Description:
% - Implements dogleg trust-region optimization
% - The matrix B_k of the quadratic model is obtained with modified symmetric indefinite LDL' factorization
% - See Algorithm 4.1 in Nocedal & Wright
function [x_out, numCalls, numSolves, gradNorms] = dogleg_trustRegion( x_in, d... |
github | mbonakda/nw-opt-master | projected_gradient.m | .m | nw-opt-master/projected_gradient.m | 3,020 | utf_8 | d0c6206a020784e79df34fe531784884 | % Author: Matt Bonakdarpour
% Description:
% - Implements the Gradient Projection Method for Quadratic Programs
% - uses conjugate gradient iteration to find approximate solution of subproblem
% - Nocedal and Wright, Algo 16.5
function [ x ] = projected_gradient(G, b, l, u)
N = size(b, 1);
x_k = zeros(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.