# Create Waveform for AD9371 in Matlab

Hi,

I'd like to generate a 307.2M SPS lte waveform for my test evaluation. I tried to follow analog wiki procedure, generate 30.72M SPS waveform and resample to higher. But signal spectrum doesn't seem to be good.

My code is blelow.

sig_Rate = resample(tmwaveform, 10, 1);

db_backoff = 3;
lte_20MHz = sig_Rate * (10^(-db_backoff/20))/max([max(real(sig_Rate)) abs(min(real(sig_Rate))) max(imag(sig_Rate)) abs(min(imag(sig_Rate)))]);

lte_20MHz_iq = [real(lte_20MHz) imag(lte_20MHz)];

lte_20MHz_iq_fft = fftshift(fft(lte_20MHz_iq));
figure(2);
plot(20*log(abs(lte_20MHz_iq_fft)));
grid on; I Also looked at AD9371 offcial IQ file " LTE_DL_30p72_20M_TM3p1_122.88rate.txt", whose spectrum is ideal. I guess it might be necessary to add an FIR after changing the sampling rate, but i am not good at this.

Appreciate if anyone can help for my case to improve the code and achieve a good spectrum.
{"ft_lang_label":"__label__en","ft_lang_prob":0.7959878,"math_prob":0.9785268,"size":1392,"snap":"2019-26-2019-30","text_gpt3_token_len":402,"char_repetition_ratio":0.11815562,"word_repetition_ratio":0.0,"special_character_ratio":0.2823276,"punctuation_ratio":0.14285715,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9748775,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,7,null,7,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-19T19:00:09Z\",\"WARC-Record-ID\":\"<urn:uuid:fb624090-26f3-4242-adc7-f0b1217aa657>\",\"Content-Length\":\"178807\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:75411804-a0a0-483f-a57e-1cd3e92be292>\",\"WARC-Concurrent-To\":\"<urn:uuid:899d7e03-6220-4a67-a223-32a35ecb546e>\",\"WARC-IP-Address\":\"23.67.106.155\",\"WARC-Target-URI\":\"https://ez.analog.com/wide-band-rf-transceivers/design-support-ad9371/f/q-a/108332/create-waveform-for-ad9371-in-matlab\",\"WARC-Payload-Digest\":\"sha1:PTDDMNDBZYHHSDV6T43B3M4347XSJHED\",\"WARC-Block-Digest\":\"sha1:NA24CXOXXGGDUQVD6PIGDDLIDU5CD63Z\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195526337.45_warc_CC-MAIN-20190719182214-20190719204214-00146.warc.gz\"}"}