vec2mesh.m

来自「国外一款非线性估计的工具箱」· M 代码 · 共 26 行

M
26
字号
function meshstruct = vec2mesh (vecstruct,npts)% VEC2MESH transforms grid points from vector to mesh.%% MESHSTRUCT = VEC2MESH(VECSTRUCT,NPTS)%   transforms the vector variable VECSTRUCT to the mesh structure%   MESHSTRUCT based on the values of NPTS (numbers of points). The%   MESHSRTUCT variable can be used in MESH fuction, for instance.%   VEC2MESH works for 2-dim systems only (NPTS must be a vector of%   dimension 2).%% Nonlinear Filtering Toolbox version 2.0rc1% Copyright (c) 1995 - 2007 NFT developement Team,%              Department of Cybernetics,%              University of West Bohemia in Pilsenif length(npts)~=2    error('The function works for 2-dim systems only.')endind = 0;for j = 1:npts(1)    for i = 1:npts(2)        ind = ind + 1;        meshstruct(i,j) = vecstruct(ind);    end  end

⌨️ 快捷键说明

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