필터 지우기
필터 지우기

embedded matlab function

조회 수: 2 (최근 30일)
Ngan Shan
Ngan Shan 2011년 12월 22일
I'm using embedded matlab function for my project. How to initialize the parameter just once at the beginning? some sort like this: j = 0 (initialize once only) j=j+1 (the value of j is updated after every loop running)

답변 (1개)

Rick Rosson
Rick Rosson 2011년 12월 22일
Please try:
persistent j
if isempty(j)
j = 0;
end
j = j + 1;
HTH.
Rick

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by