필터 지우기
필터 지우기

Simulink에서 Matlab Function Block 내의 if 조건문

조회 수: 2 (최근 30일)
DONGHUN LEE
DONGHUN LEE 2020년 9월 14일
답변: Sourabh Kondapaka 2020년 9월 17일
Simulink의 Matlabfunction block에서 if 조건문을 작성하면 읽히지 않던데 왜 그런지 알 수 있을까요

답변 (1개)

Sourabh Kondapaka
Sourabh Kondapaka 2020년 9월 17일
Hi,
Please provide some more info on the model you are trying to build and the code in the matlab function block.
Below is simple Simulink model which uses a Matlab function block :
And the code in the Matlab Function Block is :
function y = fcn(u)
if u > 0
y = 1;
else
y = 0;
end
end
And the output of the Display Block is :
For more information on Simulink Function block check here
For more info please check here

카테고리

Help CenterFile Exchange에서 모델링에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!