embedded matlab function
2 ビュー (過去 30 日間)
古いコメントを表示
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)
0 件のコメント
回答 (1 件)
Rick Rosson
2011 年 12 月 22 日
Please try:
persistent j
if isempty(j)
j = 0;
end
j = j + 1;
HTH.
Rick
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!