Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
What is this block?
조회 수: 1 (최근 30일)
이전 댓글 표시
댓글 수: 2
Walter Roberson
2016년 12월 8일
That appears to be a Heaviside function. Are you asking whether there is a built-in Simulink block to implement it? I do not find it as a single block in Simulink
답변 (1개)
Prashanth Krishnan
2016년 12월 14일
As Walter mentioned, the block in the image represents a heaviside function. Unfortunately, there is currently no block for the 'heaviside' function in Simulink. However, there is a function in MATLAB that implements this, and is called "heaviside". Please refer to the following link for documentation on this function:
댓글 수: 1
Walter Roberson
2016년 12월 14일
Correct URL should be https://www.mathworks.com/help/symbolic/heaviside.html as the one you gave was for use inside the MuPAD engine.
Either version uses the symbolic engine, which is a problem for Acceleration as nothing in symbolic toolbox can be compiled.
I would therefore suggest using a MATLAB Function Block with
result = double(u >= 0)
or
result = double(u > 0);
or
result = double(u > 0) + double(u == 0) * 1/2;
depending on the behavior that was wanted for 0 exactly.
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!