zhaokg / Rbeast

Bayesian Change-Point Detection and Time Series Decomposition
208 stars 36 forks source link

latest MATLAB version with beast123 produce error #12

Closed michalkvasnicka closed 11 months ago

michalkvasnicka commented 12 months ago

Example regarding "beast123.m" (Ubuntu 22.04 Linux, Matlab R2023a upd3):

load('Nile')   % Nile river annual streamflow: trend-only data
metadata=[];
metadata.season     = 'none'  % trend-only
metadata.startTime = 1871;
metadata.deltaTime = 1;
% Default values will be used if parameters are missing
o=beast123(Nile,metadata) 
printbeast(o)
plotbeast(o)

produce the following error message:

Error using plot
Vectors must be the same length.
Error in plotbeast>plot_order (line 622)
plot(h, t,   Order,  'color',clr );
Error in plotbeast (line 260)
plot_order(h,ytitle, has, clr,x, t, t2t,Order, ncp, cp);
zhaokg commented 12 months ago

Sorry for this silly error: I was in a hurry to change the code upon a user's request for an Octave veresion of the program. Now I fixed the typo and it should be working. Thanks a lot.

michalkvasnicka commented 11 months ago

Thanks ... problem solved!!!