资源简介
这是我做的OFDM程序,对系统可以有很清楚的认识,里面包含很多子程序,可以直接的调用
代码片段和文件信息
% analysis.m
% Analysis
disp(‘ ‘) disp(‘------------------------------------------------------------‘)
disp(‘Preparing Analysis‘)
figure(1) clf
if (input_type == 1) & (test_input_type == 1)
subplot(221) stem(data_in) title(‘OFDM Binary Input Data‘);
subplot(223) stem(output) title(‘OFDM Recovered Binary Data‘)
else
subplot(221) plot(data_samples) title(‘OFDM Symbol Input Data‘);
subplot(223) plot(output_samples) title(‘OFDM Recovered Symbols‘);
end
subplot(222) plot(xmit) title(‘Transmitted OFDM‘);
subplot(224) plot(recv) title(‘Received OFDM‘);
% dig_x_axis = (1:length(QAM_tx_data))/length(QAM_tx_data);
% figure(4) clf subplot(212)
% freq_data = abs(fft(QAM_rx_data));
% L = length(freq_data)/2;
dig_x_axis = (1:length(xmit))/length(xmit);
figure(2) clf
if channel_on ==1
num = [1 zeros(1 d1-1) a1 zeros(1 d2-d1-1) a2];
den = [1];
[H W] = freqz(num den 512);
26
mag = 20*log10(abs(H));
phase = angle(H) * 180/pi;
subplot(313)
freq_data = abs(fft(recv));
L = length(freq_data)/2;
plot(dig_x_axis(1:L) freq_data(1:L))
xlabel(‘FFT of Received OFDM‘)
axis_temp = axis;
subplot(311)
freq_data = abs(fft(xmit));
plot(dig_x_axis(1:L) freq_data(1:L)) axis(axis_temp)
title(‘FFT of Transmitted OFDM‘)
subplot(312)
plot(W/(2*pi)mag)
ylabel(‘Channel Magnitude Response‘)
else
subplot(212)
freq_data = abs(fft(recv));
L = length(freq_data)/2;
plot(dig_x_axis(1:L) freq_data(1:L))
xlabel(‘FFT of Received OFDM‘)
axis_temp = axis;
subplot(211)
freq_data = abs(fft(xmit));
plot(dig_x_axis(1:L) freq_data(1:L)) axis(axis_temp)
title(‘FFT of Transmitted OFDM‘)
end
% if file_input_type == 4
% figure(5)
% subplot(211)
% image(data_in);
% colormap(map);
% subplot(212)
% image(output);
% colormap(map);
% end
if do_QAM == 1 % analyze if QAM was done
figure(3) clf
if (input_type == 1) & (test_input_type == 1)
subplot(221) stem(data_in) title(‘QAM Binary Input Data‘);
subplot(223) stem(QAM_data_out) title(‘QAM Recovered Binary Data‘)
else
subplot(221) plot(data_samples) title(‘QAM Symbol Input Data‘);
subplot(223) plot(QAM_output_samples) title(‘QAM Recovered Symbols‘);
end
subplot(222) plot(QAM_tx_data) title(‘Transmitted QAM‘);
subplot(224) plot(QAM_rx_data) title(‘Received QAM‘);
dig_x_axis = (1:length(QAM_tx_data))/length(QAM_tx_data);
figure(4) clf
if channel_on ==1
subplot(313)
freq_data = abs(fft(QAM_rx_data));
L = length(freq_data)/2;
plot(dig_x_axis(1:L) freq_data(1:L))
xlabel(‘FFT of Received QAM‘)
axis_temp = axis;
subplot(311)
freq_data = abs(fft(QAM_tx_data));
plot(dig_x_axis(1:L)freq_data(1:L)) axis(axis_temp)
title(‘FFT of Transmitted QAM‘)
subplot(312)
plot(W/(2*pi)mag)
ylabel(‘Channel Magnitude Response‘)
else
subplot(212)
freq_data = abs(fft(QAM_rx_data));
L = length(freq_data)/2;
plot(dig_x_axis(1:L) freq_data(1:L))
title(‘FFT of Received QAM‘)
27
axis_temp = axis;
subplot(211)
freq_data = abs(fft(QAM_tx_data));
plo
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-03-23 15:08 OFDM-matlab\
目录 0 2014-03-23 15:08 OFDM-matlab\OFDM\
文件 5748 2005-05-18 20:38 OFDM-matlab\OFDM\analysis.m
文件 55378 2005-05-18 20:32 OFDM-matlab\OFDM\a_filter_design.m
文件 42 2005-05-18 20:37 OFDM-matlab\OFDM\a_run_demo.m
文件 3468 2005-05-18 20:40 OFDM-matlab\OFDM\BasicGUI.m
文件 225 2005-05-18 20:41 OFDM-matlab\OFDM\bin2eight.m
文件 243 2005-05-24 13:16 OFDM-matlab\OFDM\bin2pol.m
文件 397 2005-05-24 21:01 OFDM-matlab\OFDM\ch.asv
文件 397 2005-05-24 21:03 OFDM-matlab\OFDM\ch.m
文件 199 2005-05-24 21:00 OFDM-matlab\OFDM\ch_clipping.m
文件 218 2005-05-18 20:43 OFDM-matlab\OFDM\ch_multipath.m
文件 275 2005-05-24 21:05 OFDM-matlab\OFDM\ch_noise.m
文件 555 2005-05-18 20:45 OFDM-matlab\OFDM\ComputeChannelGUI.m
文件 222 2005-05-18 20:45 OFDM-matlab\OFDM\eight2bin.m
文件 6388 2005-05-24 20:56 OFDM-matlab\OFDM\ofdm.asv
文件 2500 2005-05-24 20:44 OFDM-matlab\OFDM\ofdm.fig
文件 6386 2005-05-24 20:59 OFDM-matlab\OFDM\ofdm.m
文件 528 2005-05-18 20:46 OFDM-matlab\OFDM\ofdm1.m
文件 3442 2005-05-19 11:14 OFDM-matlab\OFDM\OFDMguiFn.asv
文件 3442 2005-05-19 10:11 OFDM-matlab\OFDM\OFDMguiFn.m
文件 10180 2005-05-18 20:47 OFDM-matlab\OFDM\OFDMguiFnSound.m
文件 434 2005-05-18 20:48 OFDM-matlab\OFDM\pol2bin.m
文件 4436 2005-05-18 20:49 OFDM-matlab\OFDM\QAM.m
文件 977 2005-05-24 11:21 OFDM-matlab\OFDM\read.asv
文件 963 2005-05-25 14:23 OFDM-matlab\OFDM\read.m
文件 510 2005-05-18 20:51 OFDM-matlab\OFDM\rx.m
文件 228 2005-05-18 20:52 OFDM-matlab\OFDM\rx_chunk.m
文件 979 2005-05-18 20:53 OFDM-matlab\OFDM\rx_dechunk.m
文件 2865 2005-05-18 20:54 OFDM-matlab\OFDM\setup.m
文件 293 2005-05-18 20:55 OFDM-matlab\OFDM\SetupGUI.m
............此处省略8个文件信息
评论
共有 条评论