Convert equations to MATLAB code
3 ビュー (過去 30 日間)
古いコメントを表示
% Equation 1
Vi(k+1)=w*Vi(k)+c1*r1(Xi,best(k))+c2*r2(Xg,best(k)-Xi(k))
% Equation 2
Xi(k+1)=Xi(k)+Vi(k+1)
% Equation 3
w(k)=wmax-(wmax-wmin)/Niter
0 件のコメント
回答 (1 件)
KALYAN ACHARJYA
2019 年 5 月 18 日
編集済み: KALYAN ACHARJYA
2019 年 5 月 18 日
Last two equations are already in Matlab form, may be just required (.) dot in equation 3 depending on type of variable (if any vector dot operation).
In first equation best(k) menas?
6 件のコメント
Walter Roberson
2019 年 5 月 19 日
You already wrote them in MATLAB form, provided that the three conditions I mentioned hold. If any of those three conditions do not hold, you have to tell us more details.
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!