How to convert a GRD file to XYZ or MAT file
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello, does anybody know how to convert a GRD file (from surfer) to a XYZ or MAT file. I would prefered MAT file. I've been looking but I couldn't find anything.
Thanks a lot for your help!!
댓글 수: 0
답변 (1개)
Jacob Valdes
2021년 6월 15일
function XYZ=grdtoxyz(X,Y,Z)
% X=(X,2);
% Y=(Y,2);
ccont=1;
for i=1:size(X,1)
for ii=1:size(X,2)
XYZ(ccont,:)=[X(i,ii) Y(i,ii) Z(i,ii)];
ccont=ccont+1;
end
end
XYZ= XYZ(isfinite(XYZ(:, 3)), :);
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Electrical Block Libraries에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!