From ffb6c63b3dffe51b34b2ec431c8bdd67438a86da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr> Date: Fri, 20 May 2011 10:54:08 +0200 Subject: [PATCH] k-order perturbation: fixed bug in M-file evaluation (cherry picked from commit f5b35df24f1a0e11d395043e8d659388e9e59dc5) --- mex/sources/k_order_perturbation/dynamic_m.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mex/sources/k_order_perturbation/dynamic_m.cc b/mex/sources/k_order_perturbation/dynamic_m.cc index 1279e522c4..2970f77615 100644 --- a/mex/sources/k_order_perturbation/dynamic_m.cc +++ b/mex/sources/k_order_perturbation/dynamic_m.cc @@ -43,7 +43,7 @@ DynamicModelMFile::eval(const Vector &y, const Vector &x, const Vector &modParam memcpy((void *) (mxGetPr(prhs[0])), (void *) y.base(), y.length()*sizeof(double)); memcpy((void *) (mxGetPr(prhs[1])), (void *) x.base(), x.length()*sizeof(double)); memcpy((void *) (mxGetPr(prhs[2])), (void *) modParams.base(), modParams.length()*sizeof(double)); - memcpy((void *) (mxGetPr(prhs[3])), (void *) ySteady.base(), modParams.length()*sizeof(double)); + memcpy((void *) (mxGetPr(prhs[3])), (void *) ySteady.base(), ySteady.length()*sizeof(double)); int retVal = mexCallMATLAB(nlhs_dynamic, plhs, nrhs_dynamic, prhs, DynamicMFilename.c_str()); if (retVal != 0) -- GitLab