Making a pulse train function, given pulse width and period
Mostra commenti meno recenti
Hi, I'm trying to make a function, that takes in the pulse width, tau, and the period that each pulse is centred at, T, but I'm having some trouble
Here's what I have:
function [ x ] = pulse( T,tau )
D = [T]; % pulse delay times
t = -T : 1/fs : 2T; % signal evaluation time
w = tau; % width of each pulse
x = pulstran(t,D,@rectpuls,w);
y = rectpuls(t,tau);
plot(x);
plot(y);
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Waveform Generation in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!