plot a stepped frequency singal

Hi,
I want to plot a stepped frequency singal (like the picture)
(Time during 0 to 1 sec)

5 commentaires

Sam Chak
Sam Chak le 2 Juil 2023
You need show the mathematical function of such plot.
Else, how should we show you the method of plotting the sine wave function with increasing freqeuncy at each n scan time?
ting po chun
ting po chun le 2 Juil 2023
i do'nt know the real function but i found a function maybe refer to.
f=(-2Rβ)/cτ
f is frequency-domain, chirp of bandwidth β and pulse width τ
Tnank you!
Thanks for the additional info. The frequency of the sine wave, , is given by
.
If the phase , then having a minus sign in the frequency means that the sine wave will travel at the negative half-cycle at time . Is this intended?
Also, R and c are undefined. What are they?
t = linspace(0, 1, 1001);
R = 1; % ??
beta = 1; % chirp of bandwidth
c = 1; % ??
tau = 1; % pulse width
f = - (2*R*beta)/(c*tau); % frequency
A = 1; % amplitude
phi = 0; % phase
y = A*sin(2*pi*f*t + phi); % sine wave
plot(t, y), grid on
xlabel('time, t')
ylabel('y(t)')
By the way, you have a few unresolved questions.
ting po chun
ting po chun le 3 Juil 2023
@Sam Chak Thank you very much, but I still don't know the define of R,c is the speed of wave. Suppose I change Beta is it possible to make the attached image look like?
Sam Chak
Sam Chak le 3 Juil 2023
There are many missing info. As a person from this research field, you know the formula of the frequency, yet you don't know what R and c are. There must be a reference book, textbooks, or journal papers that show the frequency formula. So, I'm unsure how it will work out for you. For example, even if I provide a math function by guessing, you are unable to feed the values of R and c into the given math function.
Would it be more effective if you just search the math function from the literature?
Thus, I'm wondering, you accidentally produced such periodic pattern. Now, you want to identify its math function. Are you searching for a general math function that produces such periodic pattern (not the exact signal)? Or, a perfect math function with the known values of the parameters ?
How many cycles in the following time intervals?
  • between 0 and
  • between and
  • between and
  • between and
  • between and

Connectez-vous pour commenter.

Réponses (1)

Sara Boznik
Sara Boznik le 2 Juil 2023
Hi,
if you dont have specific function, you can do simple step function like below:
t = linspace(0, 1, 1000); % This defines the time scale in the plot
f = @(t) [(t > 1) - (t > 0.5)] + [(t > 0) - (t > 0.5)];
stairs(t, f(t));
Hope it help.

1 commentaire

ting po chun
ting po chun le 2 Juil 2023
@Sara Boznik i do'nt know the real function but i found a function maybe refer to.
f=(-2Rβ)/cτ
f is frequency-domain, chirp of bandwidth β and pulse width τ
Tnank you!

Connectez-vous pour commenter.

Commenté :

le 3 Juil 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by