I am using two Embedded MATLAB blocks with output signals of various dimensions in Simulink 7.3 (R2009a). I have four signals defined in the first Embedded MATLAB block, of which two, Conv, of size [61×4], and thermalinlet, [1×13], are fed to the inports of the second Embedded MATLAB block. Another scalar signal called BrickTemp which is defined in the second Embedded MATLAB block is fed back to the first block. This however throws the following error in the second Embedded MATLAB block when I try to update the diagram (CTRL+D) or run it:
Index expression out of bounds. Attempted to access element 2. The valid range is 1-1.
in conjunction with this warning:
Chart Reactor/Thermal #67 has signals with underspecified type, size, and/or complexity. Choosing values for the underspecified properties by internal rule. To avoid this warning and subsequent errors caused by incorrect choices you can either specify the signal properties more fully elsewhere in your model or set these properties explicitly.
If I break the loop, the error goes away.
Best Answer