资源简介
matlab开发-图像传输。OFDM图像传输
代码片段和文件信息
% ************* FUNCTION: ofdm_base_convert() ************* %
% This function converts data from one base to another.
% “base“ refers to number of bits the symbol/word uses to represent data.
function data_out = ofdm_base_convert(data_in base new_base)
% if new base is in a higer order than the current base
% make the size of data in current base a multiple of its new base
if new_base>base
data_in = data_in(1:...
floor(length(data_in)/(new_base/base))*(new_base/base));
end
% base to binary
for k=1:base
binary_matrix(k:) = floor(data_in/2^(base-k));
data_in = rem(data_in2^(base-k));
end
% format the binary matrix to fit dimensions of the new base
newbase_matrix = reshape(binary_matrix new_base ...
size(binary_matrix1)*size(binary_matrix2)/new_base);
% binary to new_base
data_out = zeros(1 size(newbase_matrix2));
for k=1:new_base
data_out = data_out + newbase_matrix(k:)*(2^(new_base-k));
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1440054 2014-11-26 02:01 cat.bmp
文件 263222 2014-11-26 23:40 lena.bmp
文件 970 2014-11-26 23:40 ofdm_ba
文件 3831 2014-11-26 23:40 ofdm_demod.m
文件 1174 2014-11-26 23:40 ofdm_fr
文件 8113 2014-11-25 22:39 ofdm_gani.m
文件 4286 2014-11-26 23:40 ofdm_modulate.m
文件 3195 2014-11-26 23:40 ofdm_parameters.m
文件 4259 2014-11-26 02:03 ofdm_parameters.mat
文件 11072 2014-11-26 23:40 OFDM_SIM.m
文件 1311 2015-05-05 13:40 license.txt
评论
共有 条评论