Getting numerical data for dsp.Chirp or frest.Chirp functions

1 回表示 (過去 30 日間)
Farah Akhtar
Farah Akhtar 2020 年 4 月 22 日
コメント済み: Mehmed Saad 2020 年 4 月 22 日
Is there a way to access the numerical data from the dsp.Chirp() or frest.Chirp() functions? For instance, I use the following code to generate and plot a swept frequency sinsoidal chirp. Can I access the resulting numbers, say as a vector, to process them? Say, I wish to multiply the given chirp with another signal or filter it, etc?
start_freq = 10e6;
end_freq = 100e6;
n_points = 1000;
f_range = linspace(start_freq, end_freq, n_points); %frequency range to calculate the VSWR
end_freq =start_freq+(num_periods*delta_f);
VSWR_sweptFreq_input = frest.Chirp('Amplitude',1, 'FreqRange',[start_freq end_freq], 'FreqUnits', 'Hz', 'NumSamples', n_points, 'InitialPhase', 0);
plot(VSWR_sweptFreq_input);
title('Original and Reconstructed VSWR functions')
xlabel(['Frequency' newline 'Range:' num2str(start_freq/1e6) ' to ' num2str(end_freq/1e6) ' (MHz)' ])
ylabel('Voltage (V)')

採用された回答

Mehmed Saad
Mehmed Saad 2020 年 4 月 22 日
編集済み: Mehmed Saad 2020 年 4 月 22 日
x=VSWR_sweptFreq_input.generateTimeseries;
t = x.Time;
lfm = x.Data;
or you can take it out from plot
y = gca;
t = y.Children.XData;
lfm = y.Children.YData;
  3 件のコメント
Farah Akhtar
Farah Akhtar 2020 年 4 月 22 日
Also, to clarify, I used it as follows:
ts = generateTimeseries(VSWR_sweptFreq_input);
plot(f_range, ts.data);
Mehmed Saad
Mehmed Saad 2020 年 4 月 22 日
cheers

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePole and Zero Locations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by