⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 matlab,am,fm,pm.txt

📁 几种模拟调制的matlab实现 am,fm,pm matlab7.0以上版本才可看
💻 TXT
字号:
%-- 08-4-10 上午9:58 --%
Fs=1000;
Fc=200;
N=1000;
n=0:N-1;
t=n/Fs;
x=sin(2*pi*45*t);
subplot(221)
plot(t,x);
xlabel('t(s)');ylabel('x');
title('Original Signal')
axis([0 0.1 -1 1])
y1=ammod(x,Fc,Fs);
subplot(222);
plot(t,y1);
xlabel('t(s)');ylabel('y1');
title('Amplitude Modulation Signal')
xlabel('t(s)');ylabel('y1');
axis([0 0.1 -1 1])
y2=fmmod(x,Fc,Fs,1);
subplot(223);
plot(t,y2);
xlabel('t(s)');ylabel('y2');
title('Frequency modulation')
axis([0 0.1 -1 1])
y3 = PMMOD(x,Fc,Fs,1)
subplot(224);
plot(t,y3);
xlabel('t(s)');ylabel('y3');
title('Phase modulation')
axis([0 0.1 -1 1])

  DPSKMOD Differential phase shift keying modulation.
    Y = DPSKMOD(X,M) outputs the complex envelope复包络 of the modulation of the
    message signal X using differential phase shift keying modulation微分相移键控调制.M
    is the alphabet字母表 size and must be an integer. The message signal must
    consist of integers between 0 and M-1. For two-dimensional二维的 signals, the
    function treats each column as 1 channel.
 
    Y = DPSKMOD(X,M,PHASEROT) specifies the phase rotation (rad) of the
    modulation. In this case, the total per-symbol phase shift is the sum
    of PHASEROT and the phase generated by the differential modulation.
 
    See also dpskdemod, pskmod, pskdemod.

    Reference page in Help browser
       doc dpskmod



>> help fskmod
 FSKMOD Frequency shift keying modulation
    Y = FSKMOD(X,M,FREQ_SEP,NSAMP) outputs the complex envelope of the
    modulation of the message signal X using frequency shift keying modulation. M
    is the alphabet size and must be an integer power of two.  The message
    signal must consist of integers between 0 and M-1.  FREQ_SEP is the desired
    separation between successive frequencies, in Hz.  NSAMP denotes表示 the number
    of samples per symbol and must be an integer greater than 1.  For two
    dimensional空间的 signals, the function treats each column as one channel.
 
    Y = FSKMOD(X,M,FREQ_SEP,NSAMP,FS) specifies the sampling frequency (Hz).
    The default sampling frequency is 1.
 
    Y = FSKMOD(X,M,FREQ_SEP,NSAMP,FS,PHASE_CONT) specifies the phase continuity
    across FSK symbols.  PHASE_CONT can be either 'cont' for continuous phase, 
    or 'discont' for discontinuous phase.  The default is 'cont'.
 
    See also fskdemod, pskmod, pskdemod.

    Reference page in Help browser
       doc fskmod



>> help genqammod
 GENQAMMOD General quadrature amplitude modulation
    Y = GENQAMMOD(X,CONST) outputs the complex envelope of the modulation
    of the message signal X using quadrature amplitude modulation.  The
    message signal must consist of integers between 0 and 1 less than the
    length of CONST. CONST is a one dimensional vector that specifies指定 the
    signal mapping映射. For two-dimensional signals, the function treats each
    column as 1 channel.
 
    See also genqamdemod, qammod, qamdemod, pammod, pamdemod.

    Reference page in Help browser
       doc genqammod



>> help mskmod
  MSKMOD Minimum shift keying modulation.
    Y = MSKMOD(X,NSAMP) outputs the complex envelope of the modulation of the
    message signal X using minimum shift keying modulation.  The elements of X
    must be 0 or 1.  NSAMP denotes表示 the number of samples per symbol and must be
    a positive integer.  For two dimensional signals, the function treats each
    column as one channel.
 
    Y = MSKMOD(X,NSAMP,DATAENC) specifies the data encoding method for MSK.
    DATAENC can be either 'diff', specifying differentially encoded MSK, or
    'nondiff', specifying nondifferentially encoded MSK.  The default is
    'diff'.
 
    Y = MSKMOD(X,NSAMP,DATAENC,INI_PHASE) specifies the initial phase of the MSK
    modulator.  INI_PHASE is a row vector whose length is equal to the number of
    channels in X, and has default values of 0.  Values in INI_PHASE must be
    integer multiples of pi/2.  To avoid overriding the default value of
    DATAENC, set DATAENC=[].
 
    [Y,PHASEOUT] = MSKMOD(...) returns the final phase of Y for use in
    modulating a future bit stream with differentially encoded MSK.
 
    See also mskdemod, fskmod, fskdemod.

    Reference page in Help browser
       doc mskmod



>> help oqpskmod
  OQPSKMOD Offset quadrature phase shift keying modulation.
    Y = OQPSKMOD(X) outputs the complex envelope of the modulation of the
    message signal X using OQPSK modulation. The message signal must
    consist of integers between 0 and 3. For two-dimensional signals, the
    function treats each column as 1 channel. This function implicitly
    upsamples by a factor of 2, because an odd number of samples per symbol
    is not allowed for OQPSK.
    
    Y = OQPSKMOD(X,INI_PHASE) specifies the phase offset (rad) of the
    modulated signal Y.
 
    See also oqpskdemod, pskmod, pskdemod, qammod, qamdemod, modnorm.

    Reference page in Help browser
       doc oqpskmod



>> help pammod
 PAMMOD Pulse amplitude modulation
    Y = PAMMOD(X,M) outputs the complex envelope of the modulation of the
    message signal X using pulse amplitude modulation. M is the alphabet
    size and must be an integer. The message signal must consist of
    integers between 0 and M-1. The modulated signal Y has a minimum
    Euclidean distance of 2. For two-dimensional signals, the function
    treats each column as 1 channel.
 
    Y = PAMMOD(X,M,INI_PHASE) specifies the initial phase of the modulated
    signal in radians. The default value of INI_PHASE is 0.
 
    See also pamdemod, qammod, qamdemod, pskmod, pskdemod, modnorm.

    Reference page in Help browser
       doc pammod



>> help pskmod
 PSKMOD Phase shift keying modulation
    Y = PSKMOD(X,M) outputs the complex envelope of the modulation of the
    message signal X, using the phase shift keying modulation. M is the
    alphabet size and must be an integer power or 2. The message signal X
    must consist of integers between 0 and M-1. For two-dimensional
    signals, the function treats each column as 1 channel.
 
    Y = PSKMOD(X,M,INI_PHASE) specifies the desired initial phase in
    INI_PHASE. The default value of INI_PHASE is 0.
 
    See also pskdemod, pammod, pamdemod, qammod, qamdemod, modnorm.

    Reference page in Help browser
       doc pskmod



>> help qammod
 QAMMOD Quadrature amplitude modulation
    Y = QAMMOD(X,M) outputs the complex envelope of the modulation of the
    message signal X using quadrature amplitude modulation. M is the
    alphabet size and must be an integer power of two. The message signal
    must consist of integers between 0 and M-1. The signal constellation is
    a rectangular constellation. For two-dimensional signals, the function
    treats each column as 1 channel.
 
    Y = QAMMOD(X,M,INI_PHASE) specifies a phase offset (rad).
 
    See also qamdemod, genqammod, genqamdemod, pammod, pamdemod, modnorm.

    Reference page in Help browser
       doc qammod


>> help randint
 RANDINT Generate matrix of uniformly distributed random integers.
    OUT = RANDINT generates a "0" or "1" with equal probability.
 
    OUT = RANDINT(M) generates an M-by-M matrix of random binary numbers.
    "0" and "1" occur with equal probability.
 
    OUT = RANDINT(M,N) generates an M-by-N matrix of random binary numbers.
    "0" and "1" occur with equal probability.
 
    OUT = RANDINT(M,N,RANGE) generates an M-by-N matrix of random integers.
 
    RANGE can be either a scalar or a two-element vector:
    Scalar : If RANGE is a positive integer, then the output integer
             range is [0, RANGE-1].  If RANGE is a negative integer,
             then the output integer range is [RANGE+1, 0].
    Vector : If RANGE is a two-element vector, then the output
             integer range is [RANGE(1), RANGE(2)].
 
    OUT = RANDINT(M,N,RANGE,STATE) resets the state of RAND to STATE.
 
    Examples:
     out = randint(2,3)                out = randint(2,3,4)
    out =                              out =
         0     0     1                      1     0     3
         1     0     1                      2     3     1
 
     out = randint(2,3,-4)             out = randint(2,3,[-2 2])
    out =                              out =
        -3    -1    -2                     -1     0    -2
        -2     0     0                      1     2     1






>> help modmap
 MODMAP 
 
 WARNING: This is an obsolete function and may be removed in the future.
          Please use SCATTERPLOT instead.



>> help SCATTERPLOT
 SCATTERPLOT Generate a scatter分散 plot.
 
    SCATTERPLOT(X) generates a scatter plot of X.  X can be a real or complex
    vector, or a two-column matrix矩阵 with real signal in the first column and
    imaginary signal in the second column.
 
    SCATTERPLOT(X, N) generates a scatter plot of X with decimation factor N.
    Every Nth point in X is plotted, starting with the first value.  The default
    for N is 1.
 
    SCATTERPLOT(X, N, OFFSET偏移量) generates a scatter plot of X with an offset.
    OFFSET is the number of samples skipped at the beginning of X before
    plotting.  The default value for OFFSET is zero.
 
    SCATTERPLOT(X, N, OFFSET, PLOTSTRING) generates a scatter plot of X in the
    line types, plot symbols and colors described by PLOTSTRING.  PLOTSTRING
    can be any of the strings used in the PLOT function.  The default value for
    PLOTSTRING is 'b.'.
 
    H = SCATTERPLOT(...) generates a scatter plot and returns handle to the   
    figure used to generate the scatter plot.
 
    H = SCATTERPLOT(X, N, OFFSET, PLOTSTRING, H) and
    SCATTERPLOT(X, N, OFFSET, PLOTSTRING, H) generate scatter plots using the
    figure indicated by the handle, H.  H must be a valid handle to a figure
    that was previously generated by SCATTERPLOT.  Default for H is [], which
    causes SCATTERPLOT to create a new figure.
 
    See also eyediagram, plot, scattereyedemo, scatter.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -