Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% Read 32 bit complex floating point data from GNU RADIO
- %Script is using read_complex_binary.m and write_complex_binary.m which
- %is provided by gr-utils:
- %https://github.com/gnuradio/gnuradio/tree/master/gr-utils/octave
- clear
- folder = "C:\Users\Steffen\Documents\GNURadio\";
- IQFileName = "test";
- data = read_complex_binary(folder + IQFileName + ".iq");
- SampleFreq = 24e6;
- data_length = length(data);
- t = 0:1/SampleFreq:(data_length-1)/SampleFreq;
- %% REDUCE DATASET
- data_cut = data(601:1800);
- data_cut_length = length(data_cut);
- t_cut = 0:1/SampleFreq:(data_cut_length-1)/SampleFreq;
- %% PLOT REDUCED SET
- hold on
- plot(real(data_cut));
- plot(imag(data_cut));
- hold off
- grid minor;
- %% Write to file
- write_complex_binary(data_cut,folder + IQFileName + " - shorted.iq")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement