![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1316960/image.png)
Combining 2 values in Simulink
3 ビュー (過去 30 日間)
古いコメントを表示
Hello I am receiving 2 signals in Simulink . I want to merge this 2 signals . This signals are of uneven dimension . with matlab code I am getting the following error in simulink function . Can someone please help me in this how can i replicate the following matlab code[ in right side] in simulink using the library Thanks in advance
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1316855/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1316860/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1316865/image.jpeg)
0 件のコメント
回答 (1 件)
Sam Chak
2023 年 3 月 7 日
Initialize a vector for y will solve the issue. Else, you can also use the Matrix Concatenate block.
function y = fcn(u, v)
y = zeros(1, 10); % initialize a vector
y(1:5) = u;
y(6:10) = v;
end
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1316960/image.png)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!