Phased.LinearFMWaveform Function + For Loop
이전 댓글 표시
I am trying to generate a Phase.LinearFMWaveform, as a function of a set of some particular, varying parameters. To be specific, I would like the parameters PulseWidth, PRF (Pulse Repetition Frequency), and NumPulses. (These are specific arguments that Phase.LinearFMWaveform adhere to.) I would also like to vary the Amplitude.
Basically, with each iteration of the For loop, I would like a different Phase.LinearFMWaveform to generate.
SampRate_LFM = 1e6
SweepBW_LFM = 1e5
NumRepPulse_LFM = 1
MinPW_LFM = 40e-6
MaxPW_LFM = 60e-6
MinPRF_LFM = 5e3
MaxPRF_LFM = 10e3
MinAmp_LFM = 1
MaxAmp_LFM = 5
NumRepPulse = 4
NumPulse_LFM = 1
for k = 1: NumRepPulse_LFM
PW_LFM(:, k) = round((MinPW_LFM + (MaxPW_LFM - MinPW_LFM)*rand(1))/NumRepPulse, 6, 'decimals')*NumRepPulse % generate a set of varying PWs
PRF_LFM(:, k) = round(MinPRF_LFM + (MaxPRF_LFM - MinPRF_LFM)*rand(1)/NumRepPulse, 1, 'significant')*NumRepPulse % generate a set of varying PRFs
Amp_LFM(:, k) = round(MinAmp_LFM + (MaxAmp_LFM - MinAmp_LFM)*rand(1)/NumRepPulse, 1, 'significant')*NumRepPulse % generate a set of varying Amps
LFM = phased.LinearFMWaveform('SampleRate', SampRate_LFM, 'PulseWidth', PW_LFM(k), 'PRF', PRF_LFM(k), 'SweepBandwidth', SweepBW_LFM, 'NumPulses', NumPulse_LFM)
end
답변 (1개)
Honglei Chen
2016년 6월 28일
Your code runs just fine, could you elaborate what your question is? My guess is you want to see the signal itself? If so, you can just call the step() method after you created LFM, like
x = step(LFM)
HTH
카테고리
도움말 센터 및 File Exchange에서 Array Geometries and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!