本文整理汇总了C++中sf_mex_call_matlab函数的典型用法代码示例。如果您正苦于以下问题:C++ sf_mex_call_matlab函数的具体用法?C++ sf_mex_call_matlab怎么用?C++ sf_mex_call_matlab使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sf_mex_call_matlab函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mxCreateString
extern const mxArray* sf_internal_get_sim_state_c6_DemoGazeFollowWaveIdleRand
(SimStruct* S)
{
ChartRunTimeInfo * crtInfo = (ChartRunTimeInfo *)(ssGetUserData(S));
ChartInfoStruct * chartInfo = (ChartInfoStruct *)(crtInfo->instanceInfo);
mxArray *plhs[1] = { NULL };
mxArray *prhs[4];
int mxError = 0;
prhs[0] = mxCreateString("chart_simctx_raw2high");
prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
prhs[2] = (mxArray*) get_sim_state_c6_DemoGazeFollowWaveIdleRand
((SFc6_DemoGazeFollowWaveIdleRandInstanceStruct*)chartInfo->chartInstance);/* raw sim ctx */
prhs[3] = (mxArray*) sf_get_sim_state_info_c6_DemoGazeFollowWaveIdleRand();/* state var info */
mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
mxDestroyArray(prhs[0]);
mxDestroyArray(prhs[1]);
mxDestroyArray(prhs[2]);
mxDestroyArray(prhs[3]);
if (mxError || plhs[0] == NULL) {
sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_raw2high'.\n");
}
return plhs[0];
}
示例2: sf_internal_set_sim_state_c13_ARP_02_RPSs_Bdr_GK_BIS7
extern void sf_internal_set_sim_state_c13_ARP_02_RPSs_Bdr_GK_BIS7(SimStruct* S,
const mxArray *st)
{
ChartRunTimeInfo * crtInfo = (ChartRunTimeInfo *)(ssGetUserData(S));
ChartInfoStruct * chartInfo = (ChartInfoStruct *)(crtInfo->instanceInfo);
mxArray *plhs[1] = { NULL };
mxArray *prhs[3];
int mxError = 0;
prhs[0] = mxCreateString("chart_simctx_high2raw");
prhs[1] = mxDuplicateArray(st); /* high level simctx */
prhs[2] = (mxArray*) sf_get_sim_state_info_c13_ARP_02_RPSs_Bdr_GK_BIS7();/* state var info */
mxError = sf_mex_call_matlab(1, plhs, 3, prhs, "sfprivate");
mxDestroyArray(prhs[0]);
mxDestroyArray(prhs[1]);
mxDestroyArray(prhs[2]);
if (mxError || plhs[0] == NULL) {
sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_high2raw'.\n");
}
set_sim_state_c13_ARP_02_RPSs_Bdr_GK_BIS7
((SFc13_ARP_02_RPSs_Bdr_GK_BIS7InstanceStruct*)chartInfo->chartInstance,
mxDuplicateArray(plhs[0]));
mxDestroyArray(plhs[0]);
}
示例3: sf_internal_set_sim_state_c24_ArregloSeisPorSeis
extern void sf_internal_set_sim_state_c24_ArregloSeisPorSeis(SimStruct* S, const
mxArray *st)
{
ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
mxArray *plhs[1] = { NULL };
mxArray *prhs[4];
int mxError = 0;
prhs[0] = mxCreateString("chart_simctx_high2raw");
prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
prhs[2] = mxDuplicateArray(st); /* high level simctx */
prhs[3] = (mxArray*) sf_get_sim_state_info_c24_ArregloSeisPorSeis();/* state var info */
mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
mxDestroyArray(prhs[0]);
mxDestroyArray(prhs[1]);
mxDestroyArray(prhs[2]);
mxDestroyArray(prhs[3]);
if (mxError || plhs[0] == NULL) {
sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_high2raw'.\n");
}
set_sim_state_c24_ArregloSeisPorSeis((SFc24_ArregloSeisPorSeisInstanceStruct*)
chartInfo->chartInstance, mxDuplicateArray(plhs[0]));
mxDestroyArray(plhs[0]);
}
示例4: ssGetUserData
extern const mxArray*
sf_internal_get_sim_state_c2_MigrationOWBG_Proto4_1DLinear2DNonLinear
(SimStruct* S)
{
ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
mxArray *plhs[1] = { NULL };
mxArray *prhs[4];
int mxError = 0;
prhs[0] = mxCreateString("chart_simctx_raw2high");
prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
prhs[2] = (mxArray*) get_sim_state_c2_MigrationOWBG_Proto4_1DLinear2DNonLinear
((SFc2_MigrationOWBG_Proto4_1DLinear2DNonLinearInstanceStruct*)
chartInfo->chartInstance); /* raw sim ctx */
prhs[3] = (mxArray*)
sf_get_sim_state_info_c2_MigrationOWBG_Proto4_1DLinear2DNonLinear();/* state var info */
mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
mxDestroyArray(prhs[0]);
mxDestroyArray(prhs[1]);
mxDestroyArray(prhs[2]);
mxDestroyArray(prhs[3]);
if (mxError || plhs[0] == NULL) {
sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_raw2high'.\n");
}
return plhs[0];
}