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

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

?? imagerx.m

?? 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 = wread16(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;
if SymbPerFrame ~= 0,
	SampPerFrame = (SymbPerFrame+1)*(ifftsize+guardtime);
	FrameGap = ifftsize+3*guardtime/2;
	zerotime = guardtime/2;
	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,fs,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一区二区三区免费野_久草精品视频
欧美成人性福生活免费看| 欧美午夜宅男影院| 亚洲女厕所小便bbb| 欧美一二三区在线观看| 成人丝袜18视频在线观看| 亚洲一区二区免费视频| 欧美激情资源网| 欧美一卡2卡三卡4卡5免费| 色综合久久天天综合网| 九九九精品视频| 亚洲色图制服诱惑 | 5858s免费视频成人| 国产一区二区在线观看免费| 亚洲一二三四区| 国产精品国产精品国产专区不片 | 久久青草欧美一区二区三区| 欧美主播一区二区三区| 91小视频免费看| 国产99久久久国产精品潘金| 麻豆精品在线视频| 视频一区在线播放| 一区二区三区**美女毛片| 国产精品久久久久久久久搜平片 | 紧缚捆绑精品一区二区| 天天综合日日夜夜精品| 亚洲综合免费观看高清在线观看| 久久久久久亚洲综合影院红桃| 91麻豆精品国产91久久久使用方法| 99国产精品久久| a在线欧美一区| 成人午夜在线视频| 国产高清不卡一区二区| 国产一区91精品张津瑜| 韩国精品主播一区二区在线观看 | 亚洲欧美在线aaa| 国产三级精品三级| 久久久久88色偷偷免费| 国产亚洲制服色| 精品国精品国产尤物美女| 91麻豆精品国产91久久久| 在线区一区二视频| 91久久精品网| 欧美三级电影在线观看| 91国偷自产一区二区开放时间| 一本久久精品一区二区| 91丨国产丨九色丨pron| 在线免费观看日韩欧美| 欧美日韩国产免费一区二区| 4438亚洲最大| 精品少妇一区二区三区日产乱码| 日韩欧美成人激情| 久久精品免视看| 中文字幕一区二区视频| 亚洲一区在线观看免费 | 日韩一区二区三区免费看| 欧美日韩精品是欧美日韩精品| 欧美高清性hdvideosex| 7777精品伊人久久久大香线蕉最新版| 欧美亚洲综合久久| 日韩亚洲国产中文字幕欧美| 欧美一二三区在线| 日本一区二区三区在线观看| 中文字幕视频一区二区三区久| 有码一区二区三区| 日本免费在线视频不卡一不卡二| 美日韩一区二区三区| 国产一区二区三区在线观看免费视频 | 日韩欧美国产一二三区| 久久久久99精品一区| 中文字幕一区二区三区四区| 亚洲美女偷拍久久| 人人超碰91尤物精品国产| 久久99精品久久久| 色综合久久88色综合天天免费| 在线观看视频91| 精品国产亚洲一区二区三区在线观看 | 欧美日韩国产免费| 精品sm在线观看| 最新久久zyz资源站| 亚洲一区电影777| 韩国精品久久久| 不卡av在线网| 欧美精品vⅰdeose4hd| 国产亚洲精品aa午夜观看| 亚洲精品日产精品乱码不卡| 精品无人区卡一卡二卡三乱码免费卡| 成人午夜激情视频| 欧美人妖巨大在线| 久久久久久久久97黄色工厂| 亚洲美女在线一区| 国产乱人伦偷精品视频免下载| 91丨九色丨蝌蚪富婆spa| 7777精品伊人久久久大香线蕉完整版 | 一本到一区二区三区| 欧美日韩国产另类不卡| 国产色产综合色产在线视频| 亚洲情趣在线观看| 蜜臀av一区二区| 日本精品一区二区三区高清| 日韩精品一区二区在线| 国产精品久久久久久户外露出| 天天综合日日夜夜精品| a级高清视频欧美日韩| 欧美大片免费久久精品三p| 亚洲欧美日韩国产另类专区| 国产精品一区在线| 欧美福利视频一区| 亚洲一区二区视频在线观看| 国内精品久久久久影院薰衣草 | 亚洲成年人影院| 成人综合激情网| 久久众筹精品私拍模特| 五月天中文字幕一区二区| 99v久久综合狠狠综合久久| 久久九九全国免费| 久久激情综合网| 欧美巨大另类极品videosbest| 亚洲精品视频在线| 高清在线观看日韩| 精品国产亚洲在线| 人人狠狠综合久久亚洲| 欧美日韩国产电影| 一区二区三区日韩| 日本久久电影网| 亚洲三级在线观看| k8久久久一区二区三区| 久久久久久久久久看片| 免费成人在线视频观看| 日韩一区二区在线观看视频| 天堂资源在线中文精品| 欧美日韩免费电影| 日韩影院免费视频| 欧美人xxxx| 免费观看久久久4p| 精品va天堂亚洲国产| 韩国欧美一区二区| 国产日产欧产精品推荐色 | 欧美色窝79yyyycom| 一区二区三区 在线观看视频| 欧洲一区在线电影| 亚洲精品成a人| 欧美午夜理伦三级在线观看| 夜夜精品视频一区二区| 欧美色综合久久| 日韩高清一区在线| 日韩一区二区三区四区| 久久国产剧场电影| 久久亚洲精精品中文字幕早川悠里| 色综合天天综合网天天狠天天| 日本一区二区三区高清不卡 | 欧美精品丝袜久久久中文字幕| 午夜私人影院久久久久| 7777精品伊人久久久大香线蕉| 日本aⅴ亚洲精品中文乱码| 日韩三级中文字幕| 国产剧情一区二区三区| 国产精品网站导航| 91麻豆国产香蕉久久精品| 一区二区三区欧美在线观看| 91精品国产综合久久久久久漫画| 看电视剧不卡顿的网站| 国产蜜臀av在线一区二区三区| 99在线热播精品免费| 婷婷开心久久网| 久久伊人中文字幕| a级高清视频欧美日韩| 亚洲国产三级在线| 精品久久久久99| 波多野结衣中文一区| 亚洲一区av在线| 欧美成人三级在线| 不卡的电影网站| 日韩 欧美一区二区三区| 久久人人超碰精品| 在线观看av一区| 黄色日韩三级电影| 一区二区三区小说| 日韩你懂的在线观看| www.欧美日韩| 日本免费新一区视频| 国产精品国产三级国产普通话三级| 精品视频999| 国产成人av资源| 婷婷久久综合九色国产成人| 久久精品日产第一区二区三区高清版 | 欧美性猛片xxxx免费看久爱| 麻豆精品视频在线观看免费| 欧美国产丝袜视频| 91精品婷婷国产综合久久竹菊| 国产高清不卡二三区| 丝袜诱惑亚洲看片| 国产精品区一区二区三| 91精品国产综合久久香蕉麻豆| 99综合影院在线| 久久99精品国产.久久久久| 一区二区激情视频| 国产亚洲污的网站| 91精品国产一区二区三区 | 欧美一区二区三区男人的天堂 | 日韩一区和二区|