Code covered by the BSD License
-
C2F (C)
C2F Convert a temperature from Centigrade to Farenheit
-
C2K (C)
C2K Convert a temperature from Centigrade to Kelvin
-
F2C (F)
F2C Convert a temperature from Farenheit to Centigrade
-
F2K (F)
F2K Convert a temperature from Farenheit to Kelvin
-
FFTSNDR(samples, fsample, fsi...
FFTSNDR Function to find SNR from an FFT
-
GaussFilt(BW, N)
GAUSSFILT Design a Gaussian Low-Pass Filter
-
GaussSQNR(L, MQL, STD);
GAUSSSQNR Function to calculate SQNR of A/D converter with Gaussian input
-
IMR(a, p)
IMR Calculate image rejection ratio given amplitude and phase mismatch
-
K2C (K)
K2C Convert a temperature from Kelvin to Centigrade
-
K2F (K)
K2F Convert a temperature from Kelvin to Farenheit
-
MUSTRIPLOSS (EpsR, EpsE, tand...
MUSTRIPLOSS Calculate the attenuation of a microstrip line
-
MUSTRIPZ0 (EpsR, WbyD)
MUSTRIPZ0 Calculate the characteristic impedance of a microstrip line
-
PulseSource (X, RT, FT, W, T,...
PULSESOURCE Generates output of pulsed source
-
SIMPLE_GM(mode, IN, W, L, Mu0...
SIMPLE_GM Function to find transconductance given drain current or overdrive voltage
-
SINEAPPROX(T, F, A, C)
SINEAPPROX Generates a clipped sine wave and an approximation to it.
-
STRIPLINELOSS (EpsR, tandelta...
STRIPLINELOSS Calculate the attenuation of a stripline
-
STRIPLINEZ0 (EpsR, WbyB)
STRIPLINEZ0 Calculate the characteristic impedance of a stripline
-
adbP (x)
ADBP Convert a decibel signal into a power signal
-
adbV (x)
ADBV Convert a decibel signal into an amplitude signal
-
adbm (x)
ADBM Convert a dbm signal into a power signal (Watts)
-
binomialtransformer (Zl, Z0, ...
BINOMIALTRANSFORMER Design a multisection binomial impedance transformer
-
binomialxfrmrbw (Zl, Z0, N, G...
BINOMIALXFRMRBW Calculate the bandwidth of a binomial transformer
-
ccc2pcc (ccc);
CCC2PCC Converts a complex number into magnitude and phase (in radians)
-
cfreqz.m
CFREQZ Function to plot pole-zero plot and transfer function of complex poles
-
chebpoly(N,X)
CHEBPOLY Evaluate Chebyshev polynomial
-
compare(varargin);
COMPARE Function to plot two vectors of different scales on same x axis
-
dbP (x)
DBP Convert a power signal into decibels
-
dbV (x)
DBV Convert a voltage signal into decibels
-
dbm (x)
DBM Convert a power signal (Watts) into dbm
-
deg2rad (deg)
DEG2RAD Convert a vector from degrees to radians
-
digital(varargin);
DIGITAL Function to plot digital signals
-
fft_a_p_mismatch(samples1, sa...
FFT_A_P_MISMATCH Amplitude and phase mismatch of two signals from an FFT
-
fftamp(samples, fs, f0, varar...
FFTPHASE Function to find phase of a particular frequency from an FFT
-
fftamp(samples, fs, f0, varar...
FFTAMP Function to find amplitude of a particular frequency from an FFT
-
fftbandamp(samples, fs, fL, f...
FFTBANDAMP Function to find rms amplitude of a particular band from an FFT
-
freqs1 (B,A,W)
FREQS1 Function to find the frequency response of a filter at 1 frequency
-
iscmplx (x)
ISCMPLX Tests if a number or array is complex
-
iseven (x)
ISEVEN Tests if a number or vector is even
-
isodd (x)
ISODD Tests if a number or vector is odd
-
lambertw (A)
-
llimit (x, m);
LLIMIT Limit a vector to a given minimum value
-
loadspice(infname)
LOADSPICE Reads in SPICE data from .out file
-
logfft(samples, fs, vpp, vara...
LOGFFT Function to plot FFT
-
mask (vect, maskv)
MASK Mask a vector using another vector. Include only those elements in the
-
mustrip (H, Z0, EpsR)
MUSTRIP Calculate the required width of a microstrip line
-
mustripw (Weff, T, H)
MUSTRIPW Calculate the width of a microstrip line from the effective width required
-
mustripweff (W, T, H)
MUSTRIPWEFF Calculate the effective width of a microstrip line
-
parallel (varargin)
PARALLEL Computes the value of components in "parallel"
-
pcc2ccc (mag, ang);
PCC2CCC Convert the polar input into a complex number
-
pinkfilt (alpha, numtaps)
PINKFILT Generate filter coefficients for a 'pink noise' filter.
-
rad2deg (rad)
RAD2DEG Convert a vector from radians to degrees
-
repeat(x, N);
REPEAT Upsample a vector by inserting repeated samples
-
rflib
RFLIB Open the RF Circuits Toolbox SIMULINK Block Library.
-
rms (x)
RMS Compute the RMS value of a vector
-
roundto (X, Resolution)
ROUNDTO Round the input to a specified resolution
-
sd_fft(samples, fs, vpp, vara...
PLOTFFT Function to plot FFT
-
sigres(x,y)
SIGRES Function to plot the signal response of a complex system
-
singlestub (Z0, Zl, STUBTYPE)...
SINGLESTUB Computes the single-stub matching networks for a given Zl and Z0
-
singlestubresponse (Z0, Zl, D...
SINGLESTUBRESPONSE Computes the frequency response of a single-stub match
-
stripline (H, Z0, EpsR)
STRIPLINE Calculate the required width of a stripline
-
ulimit (x, m);
ULIMIT Limit a vector to a given maximum value
-
uniquepcnt(a, PCNT)
UNIQUEPCNT Set unique, ignoring roundoff error.
-
vectfilt (vect, type)
VECTFILT Filter a vector to have only specific type of elements. Types are 'real',
-
IMR_JT.m
-
L1PSD.m
-
constants.m
-
RF
-
View all files
from
RF Design and Analysis
by Jackson Harvey
A collection of functions, scripts, & Simulink models useful for designing and analyzing RF systems
|
| GaussSQNR(L, MQL, STD);
|
% GAUSSSQNR Function to calculate SQNR of A/D converter with Gaussian input
%
% GAUSSSQNR (L, MQL, STD) calculates the SQNR of an L-level A/D converter
% with maximum quantization level 'MQL' and a Gaussian input with
% standard deviation 'STD'. Answer is in dB.
function [SQNR] = GaussSQNR(L, MQL, STD);
L = round(L);
delta = 2 * MQL / (L - 1);
alpha = delta / STD;
if (iseven(L)),
QNSR = 1 - 2/sqrt(2*pi)*alpha*(L-1)*exp(-(L/2-1)^2*alpha^2/2);
QNSR = QNSR + (L-1)^2/4*alpha^2*erfc((L/2-1)*alpha/sqrt(2));
for num = 0:(L/2-2),
QNSR = QNSR + alpha^2*(2*num+1)^2/4*(erf((num+1)*alpha/sqrt(2)) - erf(num*alpha/sqrt(2)));
QNSR = QNSR - 2/sqrt(2*pi)*alpha*(2*num+1)*exp(-num^2*alpha^2/2)*(1-exp(-alpha^2/2*(2*num+1)));
end;
end;
if (isodd(L)),
QNSR = 1 - 2/sqrt(2*pi)*alpha*(L-1)*exp(-L^2*alpha^2/8);
QNSR = QNSR + (L-1)^2/4*alpha^2*erfc(L/2*alpha/sqrt(2));
for num = 1:round(L/2-1/2),
QNSR = QNSR + alpha^2*num^2*(erf((num+1/2)*alpha/sqrt(2)) - erf((num-1/2)*alpha/sqrt(2)));
QNSR = QNSR + 4/sqrt(2*pi)*alpha*num*exp(-(num^2+1/4)*alpha^2/2)*(exp(-alpha^2/2*num)-exp(alpha^2/2*num));
end;
end;
SQNR = 10*log10(1/QNSR);
|
|
Contact us at files@mathworks.com