From a882a2576028afffb816c634f6d8d233b5bb7732 Mon Sep 17 00:00:00 2001 From: Ferhat Mihoubi Date: Fri, 31 Dec 2010 16:16:29 +0100 Subject: [PATCH] - length(args) is used instead of size(args, 2) to avoid to transpose column vectors --- matlab/jacob_element.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matlab/jacob_element.m b/matlab/jacob_element.m index 83bbbf1d0..70fe12812 100644 --- a/matlab/jacob_element.m +++ b/matlab/jacob_element.m @@ -35,7 +35,8 @@ func = str2func(func); h=10e-6; pargs=args; margs=args; -for i=1:size(args,2) +% length(args) is used instead of size(args, 2) to avoid to transpose column vectors +for i=1:length(args) if i==element pargs{i} = pargs{i} + h; margs{i} = margs{i} - h;