推扬网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
推扬网 门户 你问我答 查看内容

曲德君:ofdm信号的par和papr有什么区别

2020-8-11 14:11| 发布者: admin| 查看: 80| 评论: 0

摘要: 沈雯的回答: PAPR是峰均比,PAR没什么区别吧 飞鸟和鱼的回答: data=circshift(data,);   function b = circshift(a,p)   %circshift shift array circularly.   % b = circshift(a,shiftsize) circularly sh ...

沈雯的回答:

PAPR是峰均比,PAR没什么区别吧

飞鸟和鱼的回答:

data=circshift(data,[4 0]);   function b = circshift(a,p)   %circshift shift array circularly.   % b = circshift(a,shiftsize) circularly shifts the values in the array a   % by shiftsize elements. shiftsize is a vector of integer scalars where   % the n-th element specifies the shift amount for the n-th dimension of   % array a. if an element in shiftsize is positive, the values of a are   % shifted down (or to the right). if it is negative, the values of a   % are shifted up (or to the left).   %   % examples:   % a = [ 1 2 3;4 5 6; 7 8 9];   % b = circshift(a,1) % circularly shifts first dimension values down by 1.   % b = 7 8 9   % 1 2 3   % 4 5 6   % b = circshift(a,[1 -1]) % circularly shifts first dimension values   % % down by 1 and second dimension left by 1.   % b = 8 9 7   % 2 3 1   % 5 6 4   %   % see also fftshift, shiftdim, permute.   % copyright 1984-2004 the mathworks, inc.   % $revision: 1.11.4.2 $ $date: 2004/12/06 16:34:07 $   %稀疏矩阵的特性分析   % error out if there are not exactly two input arguments   if nargin < 2 %nargin 代表函数变量的数目   error('matlab:circshift:noinputs',['no input arguments specified. ' ...   'there should be exactly two input arguments.'])   end   % parse the inputs to reveal the variables necessary for the calculations   %%判断输入条件   [p, sizea, numdimsa, msg] = parseinputs(a,p);   % error out if parseinputs discovers an improper shiftsize input   if (~isempty(msg)) %isempty 测试数组是否为空 为空返回值1,否返回值0   error('matlab:circshift:invalidshifttype','%s',msg);   end   % calculate the indices that will convert the input matrix to the desired output   % initialize the cell array of indices   idx = cell(1, numdimsa);%cell 创建空矩阵的单元数据   % loop through each dimension of the input matrix to calculate shifted indices   for k = 1:numdimsa   m = sizea(k);   idx{k} = mod((0:m-1)-p(k), m)+1;   end   % perform the actual conversion by indexing into the input matrix   b = a(idx{:});   %%%   %%% parse inputs   %%%   function [p, sizea, numdimsa, msg] = parseinputs(a,p)   % default values   sizea = size(a);   numdimsa = ndims(a);%ndims 取数组的维数   msg = '';   % make sure that shiftsize input is a finite, real integer vector   sh = p(:);   isfinite = all(isfinite(sh));%isfinite 检测数组元素的有限元素,返回一个与a维相同的数组,相对应的,有限值为1,无限或nun为0 %all测试是否所有元素都为非零元素,是,1;否0.以列检测。   nonsparse = all(~issparse(sh));%issparse(a) 检测矩阵是否为稀疏矩阵 a为稀疏矩阵返回逻辑值1,反之则反   isinteger = all(isa(sh,'double') & (imag(sh)==0) & (sh==round(sh)));%isa 检测sh对象的类,imag 取复数的虚部,round 去最近的整数   isvector = ((ndims(p) == 2) && ((size(p,1) == 1) || (size(p,2) == 1)));   if ~(isfinite && isinteger && isvector && nonsparse)   msg = ['invalid shift type: ' ...   'must be a finite, nonsparse, real integer vector.'];   return;   end   % make sure the shift vector has the same length as numdimsa.   % the missing shift values are assumed to be 0. the extra   % shift values are ignored when the shift vector is longer   % than numdimsa.   if (numel(p) < numdimsa) %numel(a)返回数组a中元素的个数   p(numdimsa) = 0;   end


鲜花

握手

雷人

路过

鸡蛋

最新评论

热门推荐
最新资讯

广告服务|投稿要求|禁言标准|版权说明|免责声明|手机版|小黑屋|推扬网 ( 粤ICP备18134897号 )|网站地图 | 邮箱:vayae@hotmail.com

GMT+8, 2025-5-1 16:37 , Processed in 0.062021 second(s), 28 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

返回顶部