Old/Tutorials/k0SDR/Tutorial00: plotall.m

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