Prev: remove or modify xmlwrite encoding attribute
Next: Correct use of fftshift and ifftshift at inpu tto fft and ifft
From: Thomas Weingarten on 23 Jun 2010 05:09 Hello together, i'm trying to simulate a non-linear model consisting of three differential equations in simulink. I'm using a very simple structure with step-block, embedded-Matlab-function, integrator and Scope. This simulation returns the following error: Embedded MATLAB Interface Error: Call to MATLAB function aborted: Domain error. To compute complex results, make at least one input complex, e.g. 'power(complex(a),b)'. Block Embedded MATLAB Function (#19) While executing: none. The embedded matlab function contains just three differetial equation of the form: xdot1=f(x1,x2,x3,u) xdot2 =f(x1,x2,x3,u) xdot3=f(x1,x2,x3,u) This error occurs because of a sqrt with negativ argument. When I'm normalizing the time, so that the time is strechted by 1e8 the simulation runs. Is there any possibilty to avoid the occurance of this error ??? Thanks Thomas |