void send2matlab(int xr,int yr) { mxArray *T = NULL, *result = NULL; double time[4] = { 0, 0}; int s1; int s21; int s41; int s22; int s42; s21 = 0.1035*xr-7.4822; s41 = -0.0057*xr+57.21; s1 = -0.1255*yr+102.32; s22 = -0.082*yr+48.439; s42 = -0.0169*yr+60.594; s22 = (s22+s21)/2; s42 = (s42+s41)/2; time[0] = (double)s1; time[1] = (double)s22; time[3] = (double)s42; //Funktionen für MATLAB Schnittstellle T = mxCreateDoubleMatrix(1, 4, mxREAL); memcpy((void *)mxGetPr(T), (void *)time, sizeof(time)); engPutVariable(ep, "xy", T); //T als Variable xy in MATLAB Konsole schreiben engEvalString(ep, "global xy"); engEvalString(ep, "kinematic(xy)"); }