Old/Tutorials/k0SDR/Tutorial00: plotall.m
| File plotall.m, 444 bytes (added by , 19 years ago) |
|---|
| Line | |
|---|---|
| 1 | function plot_sig(file_name); |
| 2 | |
| 3 | fid = fopen(file_name,'r'); |
| 4 | F = fread(fid,'float'); |
| 5 | figure(1); |
| 6 | clf; |
| 7 | set(gca,'FontSize', 13); |
| 8 | set(gca, 'FontWeight', 'bold'); |
| 9 | set(gca,'LineWidth',1.5); |
| 10 | [n,m]=size(F) |
| 11 | re = F(1:2:n-1); |
| 12 | im = F(2:2:n); |
| 13 | |
| 14 | c = complex(re, im); |
| 15 | xmin = 1000; |
| 16 | xmax = 5000; |
| 17 | |
| 18 | plot(re(xmin:xmax)); |
| 19 | ylabel('real part'); |
| 20 | xlabel('time'); |
| 21 | |
| 22 | |
| 23 | fclose(fid); |
| 24 | filename = sprintf('%s.jpeg',file_name); |
| 25 | print('-djpeg',filename); |
| 26 |
