MATLAB

1. Problem statement

a) Write the function discrete_pulse_train() to have the following function prototype:

function [x,n] = discrete_pulse_train(W,M,Np,D,N)

% [x,n] = discrete_pulse_train(W,M,Np,D,N)

% Generate a discrete-time pulse train

%================ Inputs =========================================

% W = pulse width in samples

% M = period in samples, M > W

% Np = Number of periods to create (if 0 full out to N samples)

% D = turn-on delay in samples of the first period

% N = total number of samples to create

%================ Outputs ========================================

% x = signal vector (a row vector)

% n = integer time axis corresponding to x

%////////////////////////////////////////////////////////////////

An example plot from this function obtained using the command line

>> [x,n] = discrete_pulse_train(5,18,4,13,200);

1. Problem statement

a) Write the function discrete_pulse_train() to have the following function prototype:

function [x,n] = discrete_pulse_train(W,M,Np,D,N)

% [x,n] = discrete_pulse_train(W,M,Np,D,N)

% Generate a discrete-time pulse train

%================ Inputs =========================================

% W = pulse width in samples

% M = period in samples, M > W

% Np = Number of periods to create (if 0 full out to N samples)

% D = turn-on delay in samples of the first period

% N = total number of samples to create

%================ Outputs ========================================

% x = signal vector (a row vector)

% n = integer time axis corresponding to x

%////////////////////////////////////////////////////////////////

An example plot from this function obtained using the command line

>> [x,n] = discrete_pulse_train(5,18,4,13,200);

### Recently Asked Questions

- Jane has 6 rats numbered 1 , 2 , 3 , 4 , 5 , 6 and she wants to choose 3 rats at random for the high-fat diet and the rest for the normal diet . If she starts

- Let a continuous random variable X have the pdf : 2 1 ; 0 1 0 ;

- If P A N = 0.30 , P B N = 0.40 , and A and B are independent , what is P A N1 B N ?