Thomas Marullo
unread,Sep 27, 2011, 4:10:32 PM9/27/11You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I am trying to create an S-function with input 0 as a dynamically sized matrix MxM and input 1 as a dynamically sized vector of Mx1. I am getting errors about the ports sizes. What am I missing here?
static void mdlInitializeSizes(SimStruct *S)
{
/*Input Port 0 */
inputDimsInfo.width = DYNAMICALLY_SIZED;
ssSetInputPortDimensionInfo(S, 0, &inputDimsInfo);
ssSetInputPortMatrixDimensions( S ,0, DYNAMICALLY_SIZED, DYNAMICALLY_SIZED);
ssSetInputPortDataType(S, 0, SS_DOUBLE);
ssSetInputPortDirectFeedThrough(S, 0, 1);
/*Input Port 1 */
ssSetInputPortWidth(S, 1, DYNAMICALLY_SIZED);
ssSetInputPortDataType(S, 1, SS_DOUBLE);
ssSetInputPortDirectFeedThrough(S, 1, 1);
/*Output Port 1*/
ssSetOutputPortWidth(S, 0, OUTPUT_0_WIDTH);
ssSetOutputPortDataType(S, 0, SS_DOUBLE);