Hi,
passing an array or a 2D array is causing me some trouble.
can you please check the way i am doin it?
Here is how i define my arrays and pass them:
Code:
///////////////////////////////////////////////////////////////////////////////////////
main.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "NN3.h"
int main()
{
real_T u[2][3] = {
{0.8147, 0.1270, 0.6324},
{0.9058, 0.9134, 0.0975}
};
real_T D[1][3] = {0.7922, 0.6557, 0.8491};
real_T u_test[2][3] = {{0.9572, 0.8003, 0.4218},
{0.4854, 0.1419, 0.9157}
};
real_T D_test [1][3] ={0.2785, 0.9575, 0.1576};
y = NN3(u,*D, u_test, *D_test);
return 0;
}
//////////////////////////////////////////////////////////////////////////////////////////
the function prototype is defined as:
Code:
void NN3(const real_T eml_u[6], const real_T eml_D[3], const real_T
eml_u_test[6], const real_T eml_D_test[3], real_T eml_y[3])
I dont want to change the function prototype. I would rather change the way i am passing the arrays in main.c
Thanks,
MAS