代码拉取完成,页面将自动刷新
function m_tba2b(fnam);
% M_TBA2B Converts the ASCII TerrainBase 5-minute bathymetry database
% (size 56Mb) available from
% ftp://ncardata.ucar.edu/datasets/ds759.2/tbase.Z
% into a binary file of 2-byte integers that can be read by
% M_TBASE to provide high-resolution global bathymetry.
%
% To use this file, first
%
% a) get and uncompress the tbase.Z file from the above URL into the
% current directory.
%
% b) run this function:
%
% m_tba2b(PATHNAME)
%
% to store the resulting binary (of size 18Mb) as PATHNAME/tbase.int
%
% c) Edit the PATHNAME setting in M_TBASE to point to the
% location of this file.
%
% d) delete the ASCII file tbase.
%
% Rich Pawlowicz (rich@ocgy.ubc.ca) 2/Oct/1997
%
% This software is provided "as is" without warranty of any kind. But
% it's mine, so you can't sell it.
if nargin==0,
fnam='.';
end;
fnam=[fnam '/tbase.int'];
fid=fopen('tbase','rt');
if fid==-1,
error('Cannot find file called ''tbase'' ');
end;
fidb=fopen(fnam,'w');
if fidb==-1,
error(['Cannot open file ''' fnam '''']);
end;
for k=1:466560,
data=fscanf(fid,'%6d',20);
fwrite(fidb,data,'int16');
if rem(k,2000)==0,
disp([ int2str(k) '/466450 lines processed']);
end;
end;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。