Matlabのnetcdfファイルからデータをプロットしていますが、x軸はUTC秒であると考えられます。プロット後、私はそれをHH:MM:SS形式に変更する方法を理解できないようです。 this is an example as you can see on the x-axis of what is happening は、私のような別のものを試してみました:Matlabで秒をUTCに変更する
time=datenum(x,'HH:MM:SS')
が、彼らは動作しません。 ここに私がしようとしているもののより良い例があります:このフライトのデータは2010年9月10日に撮影され、データは「秒から開始して09:00:00」に記録され、ここにコード:
%time
x = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'Time')));
%altitude
y_alt = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'GGALT')));
%temperature
y_t = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'ATX')));
%dew point
y_dp = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'DPXC')));
%vertical wind speed
y_vws = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'WIC')));
%horizontal wind speed
y_hws = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'WSC')));
%liquid water content
y_lwc = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'PLWCC')));
%ice water content
y_iwc = double(netcdf.getVar(ncid,netcdf.inqVarID(ncid,'PLWC1DC_LMI')));
figure
plot(x,y_alt, 'r')
ylim([0 15000])
title({'Altitude vs Time RF14'}, 'fontweight', 'bold', 'fontsize', 12);
xlabel('UTC (seconds)');
ylabel('Altitude (meters)');
figure
plot(x,y_t,'b',x,y_dp,'r')
ylim([-100 50])
title({'Temperature and Dew Point RF14'}, 'fontweight', 'bold', 'fontsize', 12);
xlabel('UTC (seconds)');
ylabel('Temperature (C)');
legend('Temperature', 'Dew Point');
figure
plot(x,y_vws,'b',x,y_hws, 'm')
ylim([-5 11])
xlim([0 20500])
title({'Wind Speed RF14'}, 'fontweight', 'bold', 'fontsize', 12);
xlabel('UTC (seconds)');
ylabel('Wind Speed (m/s)');
legend('Vertical Wind Speed', 'Horizontal Wind Speed');
figure
plot(x,y_lwc, 'm',x,y_iwc,'b')
ylim([-1 11])
title({'Liquid/Ice Water Content RF14'}, 'fontweight', 'bold', 'fontsize', 12);
xlabel('UTC (seconds)');
ylabel('H2O Content (g/m^3)');
legend('Liquid Water Content', 'Ice Water Content');
したがって、秒の範囲は0〜19920です。 2010年9月10日09:00:00から2010年9月10日15:32:00に終了したいと思います。何らかの理由で私はデータのことを私のために働かせることができません。
https://au.mathworks.com/matlabcentral/answers/6117-convert-date-to-unix-time?requestedDomain=www.mathworksです。 com – marekful