Matrix size mismatch in embedded function Simulink
Show older comments
Hi, I've got the following problem: I want to create a matrix in Matlab embedded function in Simulink:
I declare first X=[] ;
and then in, a loop:
...
for i=1:n
...
X=[X; Y(i,:)];
...
end
...
where Y(i,:) is an another matrix.
Error: Size mismatch (size [0 x 0] ~= size [1 x 2])
This code works outside Simulink perfectly. Can anybody help me with that? Cheers
Answers (0)
Categories
Find more on Simulink 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!