Inferred size ('[1 13]') for data ***** (#32) does not match back propagated size ('[13]') from Simulink.
Show older comments
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
1 Comment
Shailesh Raturi
on 2 Sep 2016
Edited: Shailesh Raturi
on 2 Sep 2016
check answer below.
Answers (4)
Shailesh Raturi
on 2 Sep 2016
12 votes
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!!
5 Comments
Lei Zheng
on 3 Feb 2017
Still have the error
burak ergocmen
on 2 Nov 2019
It works on my MATLAB
Ashwin
on 14 Feb 2022
Perfect Answer!
Muhammad Adil
on 5 Oct 2022
Many thnaks for answering I just tried it and solved my problem .
VIGNESH BALAJI
on 11 Oct 2023
Thank you, it was resolved. Your explanation was good :)
Walter Roberson
on 3 Feb 2017
y = zeros(13, 1);
y(:) = x(1,:);
Fangjun Jiang
on 10 Oct 2011
0 votes
Can you try y=x(1,:)';?
swapnil
on 10 Oct 2011
0 votes
2 Comments
Fangjun Jiang
on 10 Oct 2011
No, I meant with the transpose.
craq
on 30 Apr 2014
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.
Categories
Find more on Naming Conventions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!