⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 inputfilepreparation.m

📁 MATLAB语言下的(有源码):Mike Zero系列软件的前后处理 GE中岸线与MIKE岸线相互转换 Mapinfo与MIKE中数据相互转换.(对学习MIKE与学习MATLAB编程人皆有帮助,且有说
💻 M
字号:
function [TimeNum]=InputFilePreparation(StartTime,TimeStep,EndTime,Longitude,Latitude)
AllTime=StartTime:TimeStep:EndTime;
%%
Fid_Input=fopen('tidepre_time.dat','w');
if Fid_Input<0
    error('tidepre_time.dat文件正在使用中,无法进行写操作!');
end
%%
TimeNum=length(AllTime);
StationNum=length(Longitude);
for c2=1:TimeNum
    for c1=1:StationNum
        CurrentDateStr=strrep(datestr(AllTime(c2),29),'-',' ');
        CurrentHour=hour(AllTime(c2))+minute(AllTime(c2))./60+second(AllTime(c2))./3600;
        fprintf(Fid_Input,'%.10f %.10f %s %.4f\n',Longitude(c1),Latitude(c1),CurrentDateStr,CurrentHour);
    end
end
fclose(Fid_Input);

⌨️ 快捷键说明

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