Running the "t_demo" in the t_tide Matlab package from the Trunk gave the following error message,
>> t_demo
% T_DEMO - demonstration of capabilities.
% Short example of capabilities of tidal analysis toolbox.
%
% In this example, we
% a) do nodal corrections for satellites,
% b) use inference for P1 and K2, and
% c) force a fit to a shallow-water constituent.
% Version 1.0
echo on
echo on
% Load the example.
load t_example
% Define inference parameters.
infername=['P1';'K2'];
inferfrom=['K1';'S2'];
infamp=[.33093;.27215];
infphase=[-7.07;-22.40];
% The call (see t_demo code for details).
[tidestruc,pout]=t_tide(tuk_elev,...
'interval',1, ... % hourly data
'start',tuk_time(1),... % start time is datestr(tuk_time(1))
'latitude',69+27/60,... % Latitude of obs
'inference',infername,inferfrom,infamp,infphase,...
number of standard constituents used: 35
Forced fit to M10
Inference of P1 using K1
Inference of K2 using S2
Points used: 1510 of 1584
percent of var residual after lsqfit/var original: 74.18 %
Greenwich phase computed with nodal corrections applied to amplitude
and phase relative to center time
Do inference corrections
Using linearized error estimates
Index exceeds matrix dimensions.
Error in hanning (line 11)
h(1,:)=h(2,:);
Error in t_tide>residual_spectrum (line 1021)
[Pxr,fx]=pwelch(real(xres),hanning(nx),ceil(nx/2),nx,1/dt); % Call to SIGNAL PROCESSING TOOLBOX - see note in t_readme. If you have an error here
you are probably missing this toolbox
Error in t_tide>noise_stats (line 957)
[fband,Pxrave,Pxiave,Pxcave]=residual_spectrum(xres,fu,dt);
Error in t_tide (line 553)
[ercx,eicx]=noise_stats(xr(isfinite(xr)),fu,dt);
Error in t_demo (line 23)
[tidestruc,pout]=t_tide(tuk_elev,...
FYI, I have "MATLAB Version: 9.0.0.341360 (R2016a)" and a working version of the "SIGNAL PROCESSING TOOLBOX". Any one ever saw similar error messages from running "t_demo"?
Thanks!