matlab执行下列程序出现的问题:

??? Invoke Error, Dispatch Exception:

Source: Surfer.Application.1

Description: 数据不足 (需要 3 个或更多 XYZ 数据)

Help File: C:\PROGRA~1\GOLDEN~1\Surfer8\Surfer.chm

Help Context ID: 31432

Error in ==> Matlab_surfer at 31

ReturnValue=srf.GridData(DataFile, xCol, yCol, zCol,...

>>

程序如下:

clc

%% %call surfer in matlab,initializesrf=actxserver('Surfer.Application'); %calling surfersrf.visible=1;% visualization surfersrf.PageUnits='srfunitscentimeter'; %surfer unit of pagesrf.windowstate='srfwindowstatemaximized'; %surfer maximize the windowsrf.DefaultFilePath='Filepath'; %the path of data files is defined as the default path of surfer.srf.ScreenUpdating=0;% screen updating.

%% %imaging%{ReturnValue=srf.GridData(DataFile, xCol, yCol, zCol, ExclusionFilter,...    DupMethod, xDupTol, yDupTol, NumCols, NumRows, xMin, xMax, yMin, yMax,...    Algorithm, ShowReport, SearchEnable, SearchNumSectors, SearchRad1,...    SearchRad2, SearchAngle, SearchMinData, SearchDataPerSect,...    SearchMaxEmpty, FaultFileName, BreakFileName, AnisotropyRatio, AnisotropyAngle,IDPower,...    IDSmoothing, KrigType, KrigDriftType, KrigStdDevGrid, KrigVariogram, MCMaxResidual, MCMaxIterations,...    MCMInternalTension, MCBoundaryTension, MCRelaxationFactor, ShepSmoothFactor,...    ShepQuadraticNeighbors, shepweightingNeighbors, Sheprange1, Sheprange2, RegrMaxXOder, RegrMaxYOrder,...    RegrMaxTotalOrder, RBBasisType, RBRSquared, OutGrid, OutFmt, searchMaxData, ...    KrigStdDevFormat, DataMetric, LocalPolyOrder, LocalPolyPower, TriangleFileName);%}wds=invoke(srf.documents,'add',1); % creating a map window

DataFile='D:\MatlabFile\others\LINE1_64_z_domain.txt'; %LINE1_z.txt'; % xCol=1; yCol=4; zCol=5;Algorithm=1;OutGrid='D:\MatlabFile\others\LINE1_64_z_domain.grd';OutFmt=3;ReturnValue=srf.GridData(DataFile, xCol, yCol, zCol,...    Algorithm,OutGrid, OutFmt);

gridfile=OutGrid;contourframe=invoke(wds.shapes,'AddContourMap',gridfile);

其中文件LINE1_64_z_domain.txt有五列数据

请问哪位兄台知道,请不吝赐教

更多推荐