From b642763676536c148ad827a0286862be87c5ae8e Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Mon, 1 Jul 2013 14:40:08 +0200
Subject: [PATCH] csminwel bug (thanks to Johannes Pfeifer) (cherry picked from
 commit a6f6267ab0de14911c1f327a26601fcdba5aec58)

---
 MatlabFiles/csminwel.m | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MatlabFiles/csminwel.m b/MatlabFiles/csminwel.m
index 2714bab..55020df 100644
--- a/MatlabFiles/csminwel.m
+++ b/MatlabFiles/csminwel.m
@@ -180,6 +180,7 @@ while ~done
                   f3=f; x3=x; badg3=1;retcode3=101;
                else
                   gcliff=((f2-f1)/((norm(x2-x1))^2))*(x2-x1);
+                  if(size(x0,2)>1), gcliff=gcliff', end
                   [f3 x3 fc retcode3] = csminit(fcn,x,f,gcliff,0,eye(nx),varargin{:});
                   %ARGLIST
                   %[f3 x3 fc retcode3] = csminit(fcn,x,f,gcliff,0,eye(nx),P1,P2,P3,...
-- 
GitLab