makesurf.m

来自「一种快速的多叉搜索树」· M 代码 · 共 15 行

M
15
字号
function [X,Y,Z]=makesurf(data,nx)
% [X,Y,Z]=makesurf(data,nx) converts the 3D data file data into
% three matices as need by surf(). nx tells how long the row of the
% output matrices are

  [m,n]=size(data);

  n=0;
  for i=1:nx:m,
    n = n+1;
    X(:,n) = data(i:i+nx-1,1);
    Y(:,n) = data(i:i+nx-1,2);
    Z(:,n) = data(i:i+nx-1,3);
  end;

⌨️ 快捷键说明

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