Commit e2533209 authored by Stéphane Adjemian's avatar Stéphane Adjemian

Fix for Matab versions older than R2013b.

parent 08b514f5
Pipeline #2664 passed with stage
in 1 minute and 43 seconds
......@@ -9,4 +9,8 @@ function Y = rcumprod(X)
% OUTPUTS
% - Y [double] T×N array
Y = flip(cumprod(flip(X)));
\ No newline at end of file
if isoctave() || matlab_ver_less_than('9.4')
Y = flipud(cumprod(flipud(X)));
else
Y = cumprod(X, 'reverse');
end
\ No newline at end of file
......@@ -9,4 +9,8 @@ function Y = rcumsum(X)
% OUTPUTS
% - Y [double] T×N array
Y = flip(cumsum(flip(X)));
\ No newline at end of file
if isoctave() || matlab_ver_less_than('9.4')
Y = flipud(cumsum(flipud(X)));
else
Y = cumsum(X, 'reverse');
end
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment