05-26-2013 09:14 AM
Hello,
Im trying to implement a state observer (EKF) designed in Matlab, and compilled into a shared library (.dll). I was able to import the library using the import shared library tool and implement it in my code.
However, the dimensions of the outputs are not correct. My outputs are all 1D arrays, and the outputs are 2x bigger than they should be (i.e. 44 instead of 22, etc).
Here is my function prototype:
extern void EKF_Labview(real_T x[22], real_T P[484], const real_T u[4], const real_T z[9], real_T Accel_Q, real_T Moment_Q, real_T df_Q, real_T dm_Q, real_T bw_Q, real_T Pos_R, real_T Att_R, real_T Gyro_R, const struct_T Param, real_T State[12], real_T Dist[6]);
Where X,P is an input/output, and Dist/State an output.
Is this working as intended? What am i missing?
Thanks,
Alex
05-28-2013 07:31 AM
Hi Alex,
what exactly do you mean with your outputs have the doubled dimension? Do arrays have a size doubled as expected or are the values in the arrays doubled as expected or do you have to many arrays given back?
By the way, have you checked your Matlab-Code for any bugs?
Melanie