Advertisement
Guest User

Untitled

a guest
May 4th, 2021
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.77 KB | None | 0 0
  1. %% Read 32 bit complex floating point data from GNU RADIO
  2. %Script is using read_complex_binary.m and write_complex_binary.m which
  3. %is provided by gr-utils:
  4. %https://github.com/gnuradio/gnuradio/tree/master/gr-utils/octave
  5. clear
  6. folder = "C:\Users\Steffen\Documents\GNURadio\";
  7. IQFileName = "test";
  8. data = read_complex_binary(folder + IQFileName + ".iq");
  9. SampleFreq = 24e6;
  10. data_length = length(data);
  11. t = 0:1/SampleFreq:(data_length-1)/SampleFreq;
  12. %% REDUCE DATASET
  13. data_cut = data(601:1800);
  14. data_cut_length = length(data_cut);
  15. t_cut = 0:1/SampleFreq:(data_cut_length-1)/SampleFreq;
  16. %% PLOT REDUCED SET
  17. hold on
  18. plot(real(data_cut));
  19. plot(imag(data_cut));
  20. hold off
  21. grid minor;
  22. %% Write to file
  23. write_complex_binary(data_cut,folder + IQFileName + " - shorted.iq")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement