Prev: segmentation fault when standalone application tries to callib
Next: Matlab 7.0 R14 problem in Windows 7 64-bit
From: Etienne on 13 Jul 2010 06:03 Hi All I am having a very weird problem, and I am not sure how to track the root cause down. I have a mex file in Fortran, where I am tracking the derivatives of a system, either defined by equations, or the same equations in Simulink. When I run the matlab file "func.m" that conatins the matlab equations of the derivatives, it runs fine, but when I use the following form, that calls a simulink model der=feval('ab',0,U,PAR(1:3),'derivs'); The derivatives are incorrect. I have done all sorts of tests, and the error definately occurs when "func.m" is called from the mex-file. I therefore think that some memory is being overwritten somewhere, but I am not sure how I can firstly track this, or avoid this. Any help would be appreciated. Etienne |