Combining 2 values in Simulink

조회 수: 1 (최근 30일)
Prasad Joshi
Prasad Joshi 2023년 3월 7일
답변: Sam Chak 2023년 3월 7일
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

답변 (1개)

Sam Chak
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

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by