Skip to content
Snippets Groups Projects
Commit e2533209 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fix for Matab versions older than R2013b.

parent 08b514f5
Branches
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment