MATLAB: Do I get an ‘index must be a positive integer or logical’ error when I try to generate a System Snapshot from the standard System Design Description Report in Simulink Report Generator R2013b and R2014a

generatormodelingphysicalreportsimpowersystemsSimscapesimulinkSimulink Report Generatorsnapshotsystem

The following error is returned in the MATLAB command window when I try to create a System Snapshot by going to 'File > Reports > System Design Description' for my model containing Simscape components (the error in the 'Message List' dialog box of the Report Generator is slightly different): 
Attempted to access portList.Outport(NaN); index must be a positive integer or logical. 
Error while evaluating TimerFcn for timer 'timer-1' 
Attempted to access portList.Outport(NaN); index must be a positive integer or logical. 
I get this error in R2013b and R2014a but not in R2014b and R2015a.

Best Answer

  • This is a bug in R2013b and R2014a. There is a patch for it that can be found at the following location:
    https://www.mathworks.com/support/bugreports/1230112