亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? imagerx.m

?? 基于Matlab 5.3開發的ofdm仿真程序
?? M
字號:
%COFDMRD This script reads a COFDM waveform from a .WAV file and decodes it.
%	This script is the complement to the COFDMWAV script.
%	This script read the WAV file given the extracts the first frame
%	in the file. This frame is decoded and compared with the known data
%	sent by the COFDMWAV script.
%
%	The wavefile to be decoded is expected to be a 16bit windows .WAV file
%	call RX.WAV
%
%	The data expected is that generated using genrand.m, having the
%	random seed set to 123456 before it is generated.
%
%	Copyright (c) July 1997 Eric Lawrey

%================
%	Modified:
%	29/7/97	11:00am	cofdmwav.m
%	Modified simtxrx.m so that it would just generate the output of the
%	COFDM transmitter, and store the result in a wav file.
%
%	29/7/97	11:30am cofdmwav.m
%	Changed it so that a wav file of multiple frames could be generated.
%
%	29/7/97	11:48am cofdmrd.m
%	Modifed cofdmwav.m so that it now decodes the wav sound file.
%
%	2/8/97	10:25pm	imagerx.m
%	Fixed an algorithum error for picking the starting time of the frames.
%	I was using the normal start time, as for single frame simulations, which
%	meant that only early frame start time errors could only with out causing
%	error. This was fixed by picking the start time early by 1/4 of the
%	guard time (1/2 the time of the cyclic extension of the symbol), thus
%	allowing a start time error of +- 1/4 guard time.
%
%	3/8/97	2:00pm imagerx.m
%	Added the option of compressing the contrast of the picture
%	to help prevent roll over of intensity when sending 8bits/word.
%	Also added data averaging, allowing duplicates of data to
%	be sent and recombined to reduce the phase error. This works,
%	except for it giving errors for black pixels.
%
%	12/8/97 10:30pm imagerx.m
%	Made many changes to the structure of the program. It can now receive
%	random data, pictures, and general binary files. Both the random data
%	and picture transmission appears to mostly work, however the
%	data padding for data sets which are not multiples of the number of
%	carriers doesn't work yet.Also a common setting script is now used
%	for both the transmitter and receiver. This is settings.m.
%
%	17/8/97 2:00 pm imagetx.m
%	Moved the calculation of the carriers to use into the settings
%	script.

%======================================================
%	External functions required to run this script:
%	wread16.m 		(from the Matlab web site)
%	calcerr.m
%	settings.m
%	rddatatx.m
%	findfrm.m
%	receive.m
%	convbase.m
%	bmpread.m
%	bmpwrite.m
%	wrimage.m
%	wavwrite.m

clear all;
flops(0);
tic;			%Measure the time it takes to run the simulation
settings		%Setup the link parameters
%=====================
%Read in the .wav file
%=====================
SignalIn = wavread(rxwavfile);

%======================================================
%Read in the picture to be received to check for errors
%======================================================
%Read the picture with no data averaging to get just the picture data
%[Datatx,h,w] = rdimage(filename,PictureComp);
rddatatx	%Read the data which was transmitted. This sets up data
		%transmitted (DataIn) and Datatx, and the height (h) and width (w)
		%of the original data
TotNoData = h*w;
NoData = h*w;
switch guardtype
case 1
	%Zeroed guard period
	FrameGap = ifftsize+guardtime*2;
	zerotime = guardtime;
case 2
	FrameGap = ifftsize+guardtime;
	zerotime = 0;
case 3
	FrameGap = ifftsize+3*guardtime/2;
	zerotime = guardtime/2;
end
if SymbPerFrame ~= 0,
	SampPerFrame = (SymbPerFrame+1)*(ifftsize+guardtime);

	
	SignalLeft = SignalIn;
	Finished = 0;
	AllData = [];
	AllDiff = [];
	First = 1;
	if fileknown == 0,
		%Don't know how many frames so estimate from the number of samples 
		NumFrames = floor((length(SignalIn)/(SampPerFrame)));
		disp(['Estimating the number of frames as : ' int2str(NumFrames)]);
	else
		NumFrames = ceil(((TotNoData*(OutWordSize/wordsize))...
				*DataAvg/NumCarr)/SymbPerFrame);
	end
	for k = 1:NumFrames,
		disp(['Decoding Frame : ', num2str(k)]);
		%FrameCount = FrameCount+1;
		if First == 1,
			First = 0;

			Signal = SignalLeft(1:min(SampPerFrame*1.1,length(SignalLeft)));
			Scale = ([0:length(Signal)-1]/length(Signal)*mean(abs(Signal))).';
			Signal = Signal+Scale;

		else
			Signal = SignalLeft(1:min(FrameGap*3,length(SignalLeft)));
		end

		FrameStart = findfrm(Signal, FrameGap, quickrate,zerotime);

		FrameStart = FrameStart - guardtime/4;
		Signal =SignalLeft(FrameStart:...
			min(FrameStart+SampPerFrame,length(SignalLeft)));

		if k == NumFrames,
			Finished = 1;
			NoData = TotNoData;
		else
			SignalLeft = SignalLeft(...
				FrameStart+SampPerFrame-FrameGap*1.5:length(SignalLeft));
			plot(SignalLeft);
			TotNoData = TotNoData - SymbPerFrame*NumCarr/...
				(OutWordSize/wordsize)/DataAvg;
			NoData = floor(SymbPerFrame *NumCarr/(OutWordSize/wordsize)/DataAvg);
		end

		[Datarx, DiffPhRx] = receive(Signal,ifftsize,carriers,...
		 wordsize,guardtype,guardtime,DataAvg,NoData);
		AllDiff = [AllDiff DiffPhRx];
		AllData = [AllData Datarx];
	end
	DiffPhRx = AllDiff;
	Datarx = AllData;
else
	TotalWords = ceil((h*w*(OutWordSize/wordsize)*DataAvg)/NumCarr)*NumCarr;
	%===============================================================
	%Try to detect the start of a frame by envelop detection & filtering
	%===============================================================
	%Calc number of samples in a frame, no including the frame sync guard period
	SampPerFrame=((TotalWords/NumCarr)+1)*(ifftsize+guardtime);

	%Calc number of sample in a frame guard period
	SampPerFrmGrd = FrameGuard;

	disp('Searching for start of frame');
	disp('    -Filtered Signal');
	%FrameGap = ifftsize+3*guardtime/2;
	%zerotime = guardtime/2;
	FrameStart = findfrm(SignalIn(1:length(SignalIn)/2), FrameGap, quickrate,zerotime);
	FrameStart = FrameStart - guardtime/4;
	%cut out one frame to decode
	BaseSignal = SignalIn(FrameStart:FrameStart+SampPerFrame)/(2^15);
	disp('Decoding COFDM frame');



	%===============================
	%Decode the received COFDM frame
	%===============================
	[Datarx, DiffPhRx] = receive(BaseSignal,ifftsize,carriers,...
		 wordsize,guardtype,guardtime,DataAvg,NoData);
end

if (size(Datatx) == size(Datarx)),
	[PhError, Summary] = calcerr(Datatx,Datarx,DiffPhRx,wordsize);
	disp(['BER = ',num2str(Summary(1)),'    RMS phase error = ' num2str(Summary(2)),...
	'    Total number of errors = ', num2str(Summary(3))]);
else
	disp('WARNING: Length of received data does not match the transmitted length');
	disp(['length of transmitted data : ' int2str(length(Datatx))]);
	disp(['length of received data : ' int2str(length(Datarx))]);
end

Datarx = convbase(Datarx, wordsize, OutWordSize);
if DataType == 2,
	[x2,map] = bmpread(infile);
	%outfile = [outfile, num2str(SNR), 'db.bmp'];
	x=wrimage(Datarx,h,w,outfile,PictureComp);

	figure(1);
	image(x);
	colormap(map);
	title('Received image');


	figure(2);
	image(x2-1);
	colormap(map);
	title('Original Transmitted image');

	figure(3);
	colormap(map);
	image((x2-x)*8+128);
	title('Error in received image (Contrast Enhanced)');

	%errorfile = [errorfile, num2str(SNR), 'db.bmp'];

	bmpwrite(((x2-x)*8+128),map,errorfile);
	RmsAmpErr=mean(std(x2-1-x));	%RMS amplitude error of the picture
	RmsAmp = mean(std(x2));	%RMS amplitude of the original picutre
	SNRpic = 20*log10(RmsAmp/RmsAmpErr);
	disp(['SNR of the received image : ', num2str(SNRpic), ' dB']);
elseif DataType == 3,
	if OutWordSize == 8,
		DataSize = 'integer*1';
	elseif OutWordSize == 16,
		DataSize = 'integer*2';
	else
		error('OutWordSize no valid for sending binary files, must be 8 or 16');
	end
	fid = fopen(outfile,'wb');
	fwrite(fid,Datarx,DataSize);
	fclose(fid);
elseif DataType == 4,
	wavwrite(Datarx/(2^(OutWordSize)+1),fs,OutWordSize,outfile);
end
disp(['Total Time: ' num2str(toc) 'sec']);
disp(['Total FLOPS: ' num2str(flops)]);
disp(['Process Speed : ' num2str(flops/toc) ' flops/sec']);


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区在线看| 26uuu国产日韩综合| 日韩欧美成人一区| 国产精品久久看| 秋霞av亚洲一区二区三| 9i在线看片成人免费| 51午夜精品国产| 自拍偷拍亚洲欧美日韩| 国产一区日韩二区欧美三区| 欧美性大战久久久| 亚洲欧洲av另类| 国产精品一区一区| 91精品国产一区二区三区| 亚洲欧美视频在线观看| 国产91富婆露脸刺激对白| 日韩久久久久久| 天堂在线亚洲视频| 日本道在线观看一区二区| 国产精品国产自产拍在线| 国产麻豆精品在线观看| 日韩免费观看高清完整版在线观看 | 色呦呦日韩精品| 国产精品青草久久| 国产精品一区二区三区四区| 日韩写真欧美这视频| 日韩国产欧美在线播放| 欧美日韩亚洲国产综合| 亚洲高清免费在线| 欧美视频中文一区二区三区在线观看| 国产精品视频观看| 成人精品国产免费网站| 中文字幕欧美国产| 懂色av一区二区三区蜜臀| 国产欧美日产一区| 成人涩涩免费视频| 最好看的中文字幕久久| 92国产精品观看| 亚洲精品国产无套在线观| 在线观看视频欧美| 亚洲mv在线观看| 欧美一区二区三区日韩| 精品在线你懂的| 久久久久亚洲蜜桃| 成人午夜私人影院| 亚洲黄网站在线观看| 欧美视频一区二区三区在线观看| 亚洲一区二区三区影院| 欧美日韩精品欧美日韩精品一| 天堂资源在线中文精品| 日韩精品一区二区三区视频| 韩国av一区二区三区四区| 国产精品麻豆一区二区| 色av成人天堂桃色av| 婷婷中文字幕一区三区| 久久伊人中文字幕| 91小视频免费观看| 日韩精品欧美精品| 国产午夜精品一区二区| 欧美最猛性xxxxx直播| 毛片一区二区三区| 中文字幕亚洲精品在线观看| 精品视频一区二区三区免费| 麻豆91精品91久久久的内涵| 国产精品日韩精品欧美在线| 欧美性xxxxxxxx| 国产成人综合视频| 亚洲制服丝袜av| 久久久综合网站| 欧美视频三区在线播放| 国产乱国产乱300精品| 一区二区三区欧美日| 精品久久久久久亚洲综合网| 91免费版在线| 国内精品久久久久影院薰衣草 | 国产在线乱码一区二区三区| 亚洲女同女同女同女同女同69| 日韩网站在线看片你懂的| av成人老司机| 黄一区二区三区| 一区二区三区免费| 欧美激情一二三区| 欧美色倩网站大全免费| 成人黄色软件下载| 久久99精品国产麻豆不卡| 亚洲欧美aⅴ...| 中文一区二区在线观看| 日韩欧美一二三区| 欧美日韩在线三级| 色综合 综合色| 国产a视频精品免费观看| 久久99久久99| 日韩精品一二三| 亚洲欧美一区二区三区极速播放| 久久精品一区二区三区不卡牛牛| 精品视频色一区| 欧洲av一区二区嗯嗯嗯啊| 99riav一区二区三区| 国产成人精品一区二区三区四区| 日韩av网站在线观看| 亚洲国产欧美在线人成| 亚洲情趣在线观看| 国产精品网站在线观看| 国产视频一区二区三区在线观看| 精品免费视频一区二区| 日韩写真欧美这视频| 日韩一区二区在线观看视频| 正在播放亚洲一区| 91.成人天堂一区| 欧美色男人天堂| 欧美酷刑日本凌虐凌虐| 欧美日韩午夜影院| 欧美另类高清zo欧美| 精品视频色一区| 欧美三级蜜桃2在线观看| 欧美亚洲国产一区二区三区| 91行情网站电视在线观看高清版| 色香蕉久久蜜桃| 在线观看日韩精品| 欧美三区在线视频| 欧美精品aⅴ在线视频| 91精品国产综合久久香蕉的特点 | 在线观看不卡视频| 欧美日韩视频在线第一区 | 亚洲一区电影777| 亚洲在线观看免费视频| 亚洲一区二区精品视频| 日韩制服丝袜先锋影音| 免费在线观看不卡| 国产呦精品一区二区三区网站| 国产一区二区三区av电影| 懂色av中文字幕一区二区三区| 成人app网站| 在线观看成人小视频| 欧美一区日韩一区| 国产亚洲一区二区三区| 国产精品欧美精品| 亚洲一区二区三区在线| 另类小说视频一区二区| 国产激情一区二区三区| 91视视频在线直接观看在线看网页在线看| 成人av在线资源| 欧美三级在线视频| 精品成人一区二区三区四区| 国产精品久久免费看| 亚洲高清免费在线| 国产精品1区2区| 欧美性受xxxx| 久久综合九色欧美综合狠狠| 亚洲色图欧美在线| 日本va欧美va精品| 成人av免费在线| 欧美日韩小视频| 国产精品视频观看| 蜜臀av性久久久久蜜臀aⅴ| 成人黄色电影在线| 制服丝袜亚洲网站| 国产精品黄色在线观看| 日本网站在线观看一区二区三区| 国产99久久久国产精品免费看 | 国产成人一区在线| 欧美在线综合视频| 国产欧美日韩另类一区| 爽爽淫人综合网网站| 成人午夜激情影院| 日韩欧美黄色影院| 亚洲国产日韩在线一区模特| 国产精品99久| 欧美一区二区成人6969| 亚洲乱码国产乱码精品精98午夜 | 成人精品电影在线观看| 777色狠狠一区二区三区| 成人欧美一区二区三区| 久久99精品久久久久| 欧美图片一区二区三区| 亚洲欧美一区二区在线观看| 国产呦精品一区二区三区网站| 欧美日韩精品电影| 亚洲欧美另类久久久精品2019| 国产精品一区二区久激情瑜伽 | 91麻豆精品视频| 中文字幕av一区 二区| 国内不卡的二区三区中文字幕| 欧美色综合久久| 亚洲欧美日韩久久精品| av一二三不卡影片| 久久蜜桃av一区二区天堂| 久久不见久久见中文字幕免费| 欧美日韩国产系列| 亚洲午夜激情av| 欧美中文字幕一区二区三区| 亚洲精品中文字幕在线观看| 成人黄动漫网站免费app| 久久众筹精品私拍模特| 国产一区二区视频在线| 2023国产精品| 韩国精品久久久| 国产丝袜美腿一区二区三区| 经典三级在线一区| 国产日韩一级二级三级| 成人自拍视频在线观看|