From 421df01bf52d08a2f5ec639c9c231bb883828f3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Tue, 14 Nov 2017 14:29:44 +0100
Subject: [PATCH] Fixed horzcat behaviour.

The input arguments (concatenated objects) should not be modified by
the overloaded method. Use a copy.

(cherry picked from commit 883b54f977798c0e450a0649a38bae07e95fcedd)
---
 src/@dseries/horzcat.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/@dseries/horzcat.m b/src/@dseries/horzcat.m
index 47c1790..dfff226 100644
--- a/src/@dseries/horzcat.m
+++ b/src/@dseries/horzcat.m
@@ -43,7 +43,7 @@ switch nargin
   case 1
     o = varargin{1};
   otherwise
-    o = concatenate(varargin{1}, varargin{2});
+    o = concatenate(copy(varargin{1}), copy(varargin{2}));
     if nargin>2
         o = horzcat(o, varargin{3:end});
     end
-- 
GitLab