Why t_tide prediction is offseted?
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi, i'm trying to use t_tide_v1.4beta using matlab R2016a in 2 ways like in t_tide example but the result of the harmonic constants is not similar and the prediction is not similar between prediction also offseted to the observation data. Help me please. Herewith the code and the data that I use.
Code:
clear
clc
%format LONGG
%load t_example
% load data excel
data = readtable('D:\Test\T_Tide\t_tide_v1.4beta\kmna_wnan.xlsx');
time_axis = datetime(data.waktu);
data_time = datenum(time_axis);
obs_value = data.ukuran;
% Analisis Harminik
%---------------------------------------------------------------------------
% Way 1
% analisys
[NAME,FREQ,TIDECON,XOUT] = t_tide(obs_value,'interval',1,'start',data_time(1),'latitude',-3.66295,'synthesis',1);
% prediction
YOUT=t_predic(data_time,NAME,FREQ,TIDECON,'latitude',-3.66295,'synthesis',1);
% Way 2
% analisys
[HarKons,XOUT2]=t_tide(obs_value,'interval',1,'start',data_time(1),'latitude',-3.66295,'rayleigh',1,'synthesis',1);
% prediction
% YOUT=T_PREDIC(TIM,TIDESTRUC,...)
YOUTHarKons1=t_predic(data_time,HarKons,'latitude',-3.66295,'synthesis',1);
YOUTHarKons2=t_predic(data_time,HarKons);
%% visualisasi
figure(1)
plot(time_axis,obs_value,'b','LineWidth',1.5); hold on
plot(time_axis,XOUT,'r--','LineWidth',1.5); hold on
plot(time_axis,YOUT,'c.','LineWidth',1.5); hold on
plot(time_axis,YOUTHarKons1,'kx','LineWidth',1.5); hold on
plot(time_axis,YOUTHarKons2,'ko','LineWidth',1.5); hold on
title('Tidal Elevation','FontSize',14,'fontWeight','b')
legend({'obs_value', 'XOUT', 'YOUT', 'YOUTHarKons1', 'YOUTHarKons2'},'FontSize', 10, 'FontWeight', 'bold', 'Location', 'northeastoutside');
xlabel('Time','FontSize',14,'FontWeight','b')
ylabel('Elevation (m)','FontSize',14,'FontWeight','b')
% Format sumbu X agar menampilkan tanggal/waktu
% datetick('x', 'dd/mm/yyyy HH:MM:ss', 'keepticks', 'keeplimits')
grid on
Tidal graph obs_value and prediction:

Data:
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!