필터 지우기
필터 지우기

How to extract two signals from s-function block,knowing that one of them is being generated inside a For loop ?

조회 수: 2 (최근 30일)
Hello everyone, I have an S-function block and I want to extract two signals from it.the problem is that one of the two signals outputs a result of an optimisation problem [1X1] and the other signal is built during simulation with For loop with size (p,1) . How can I extract both signals during simulation.?....thanks in advance.
Note: there is no problem to extract the first signal alone,but the problem appears when trying to extract both of them,an error shows up saying that call during flag =3 must be a real vector of length 2
U % first output signal sol.of optimisation problem.[1X1]
Y_ref % second signal generated inside a for loop with size (p,1)
sys=[U;Yref]%output of S-function ===> an error shows up saying that call during flag =3 must be a real vector of length 2

답변 (0개)

카테고리

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

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by