Inferred size ('[1 13]') for data ***** (#32) does not match back propagated size ('[13]') from Simulink.

Hi, I am using embedded Matlab function block in Simulink. Function returns the row vector from input matrix (NxN).
function y=RowVector(x)
y =(x(1,:));
end
Following error is received: Inferred size ('[1 13]') for data *** (#32) does not match back propagated size ('[13]') from Simulink.
Can you help me in resolving this error? Regards Swapnil

Answers (4)

hello. step 1- click right on Matlab function and go to Explore. step 2 - there click on y, right side in general there will be size block. there is -1 written step 3- change that to [1 3] you will no get now no error njoy!!
I have tried with y =x(1,:); It was just typo mistake. But it doesn't work.

2 Comments

the transpose doesn't work for me. I tried transposing inside the Embedded Matlab Function and with a simulink block between the Embedded Matlab Function and the DeMux.

Sign in to comment.

Tags

Asked:

on 10 Oct 2011

Commented:

on 11 Oct 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!