Filter löschen
Filter löschen

embedded matlab function

2 Ansichten (letzte 30 Tage)
Ngan Shan
Ngan Shan am 22 Dez. 2011
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)

Antworten (1)

Rick Rosson
Rick Rosson am 22 Dez. 2011
Please try:
persistent j
if isempty(j)
j = 0;
end
j = j + 1;
HTH.
Rick

Kategorien

Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by