Hello,
when using Simulink with a Matlab-Function I have the issue that the dimensions do not match, [1 20] vs [20]. How can I convert to a [20] array? I cannot modify the block that expects the [20] array because it is a compiled function.
Code:
lengthOf_MyMatrix = numel(MyMatrix); % evaluate the targets size, it's a 4*5 Matrix
MyMatrix_ToVector = reshape(MyMatrix,1,lengthOf_MyMatrix); % Try to shape it to a Vector
Error-Message: Inferred size ('[1 20]') for data 'MyMatrix_ToVector' does not match back propagated size ('[20]') from Simulink.
Thank you very much,
Best Regards, Sebastian Wendel