Matlab function help in simulink model
조회 수: 1 (최근 30일)
이전 댓글 표시
i want to write this function in Matlab Function Box
{
function y = func_name(a)
b=b+a;
y=b;
}
the error is b is not defined
Actually I want write code for integration and derivative block
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2013년 8월 19일
편집: Azzi Abdelmalek
2013년 8월 19일
function y = func_name(a)
persistent b
if isempty(b)
b=0;
end
b=b+a;
y=b;
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!