Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Unable to use indexed input in a user-defined function in Simulink

조회 수: 1 (최근 30일)
Jan Kubski
Jan Kubski 2018년 9월 25일
마감: MATLAB Answer Bot 2021년 8월 20일
I have developed a function by using SImulink user-defined function. The function uses a for loop to perform math operations on previous time step (in fact a state space model). Similar to x(i) = A * x(i-1). The code works perfectly fine on mfile if I generate the test signal in mfile. Since, I want to convert the function to C code, I want to test my code in Simulink.
Simulink input is not taking indexed input to use it in for loop. An example .mdl file is attached. Where, the input of the function is used in a for loop to give output (also indexed output).

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by