From 2078e06b160d3b90d061f8993d51c89dfc132e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Mon, 4 Nov 2013 10:55:46 +0100 Subject: [PATCH] Take care of matlab's version when using builtin intersect function. --- matlab/@dates/intersect.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/matlab/@dates/intersect.m b/matlab/@dates/intersect.m index 078119b94..cd427918c 100644 --- a/matlab/@dates/intersect.m +++ b/matlab/@dates/intersect.m @@ -56,7 +56,11 @@ if ~isequal(A.freq,B.freq) return end -time = intersect(A.time,B.time,'rows'); +if isoctave || matlab_ver_less_than('8.1.0') + time = intersect(A.time,B.time,'rows'); +else + time = intersect(A.time,B.time,'rows','legacy'); +end C = dates(); if isempty(time)