⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trajs2cell.m

📁 轨迹聚类工具箱及其相关说明和文章(台风路径分类等)。如有问题可与wyljess@126.com联系
💻 M
字号:
function [y,x] = trajs2cell(trajs)
%Trajs2Cell  Extract curves in 'Trajs' format into Cell format
%
%   [y,x] = Trajs2Cell(trajs)

% Scott J Gaffney   20 October 2003
% Department of Information and Computer Science
% University of California, Irvine.
%
% Changes
% -----------------------------------


PROGNAME = 'Trajs2Cell';
if (~nargin)
  try; help(PROGNAME); catch; end
  return;
end

y=[];  x=[];

% trajs is already in Cell format
if (iscell(trajs))
  y = trajs;
  return;
end

% Feature Vector format
if (~isstruct(trajs) & isnumeric(trajs))
  y = fvec2cell(trajs);
  return;
end

% Handle 'Trajs' structure
if (isfield(trajs,'Y'))
  trajs = SetFieldDef(trajs,'X',[]);
  if (iscell(trajs.Y))
    y = trajs.Y; 
    x = trajs.X;
  end
  if (~isfield(trajs,'Seq') | isempty(trajs.Seq))
    y = fvec2cell(trajs.Y);
  else
    [y,x] = seq2cell(trajs.Y,trajs.Seq,trajs.X);
  end
  return;
end

% Cycs format
if (isfield(trajs,'trajs'))
  y = trajs.trajs;
end

⌨️ 快捷键说明

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