createzonemap.m

来自「OFDMA 物理层开发的matlab 源码.飞思卡尔提供.对物理层开发的工程师有」· M 代码 · 共 53 行

M
53
字号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Property of Freescale
%  Freescale Confidential Proprietary
%  Freescale Copyright (C) 2005 All rights reserved
%  ------------------------------------------------------------------------
%  $RCSfile: CreateZoneMap.m.rca $
%  $Revision: 1.2 $
%  $Date: Sun Oct 22 02:38:07 2006 $
%  Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Creates a figure with empty zone MAP. (OFDMA, WiMAX)
%
%   [MapStruct] = CreateZoneMap(ZoneD,[FigTitle])
%
% ZoneD: zone descriptor
% FT   : figure title
%
% The output MapStruct includes the following elements:
% MapStruct.H    : figure handle
% MapStruct.Off  : MAP anchor/origin [x,y]
% MapStruct.Unit : width of one unit [x,y]
%
% See also: AddDLburst
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [MapStruct] = CreateZoneMap(ZoneD,FT)

if ~exist('FT','var')
  FT='Zone MAP (OFDMA, WiMAX)';
end

MapStruct = struct('H',0,'Off',0,'Unit',0);

%create MAP figure (empty) 
MapStruct.H=figure;
MapAxes = axes(...
  'XGrid','on',...
  'XTick',(0:ZoneD.NumSym),...
  'YDir','reverse',...
  'YGrid','on',...
  'YTick',(0:ZoneD.NumSubch),...
  'TickDir','out',...
  'Parent',MapStruct.H);
axis(MapAxes,[0 ZoneD.NumSym 0 ZoneD.NumSubch]);
title(MapAxes,FT);
xlabel(MapAxes,'OFDMA symbols');
ylabel(MapAxes,'Subchannels');
box(MapAxes,'on');
AxesPos=get(MapAxes,'Position');

%units and offsets (y axis reverse!)
MapStruct.Unit=[AxesPos(3)/ZoneD.NumSym , AxesPos(4)/ZoneD.NumSubch];
MapStruct.Off =[AxesPos(1) , AxesPos(2)+AxesPos(4)];

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?