Subscript indices must either be real positive integers or logicals.

1 回表示 (過去 30 日間)
div
div 2019 年 4 月 17 日
コメント済み: madhan ravi 2019 年 4 月 17 日
for i=1:3
for j=1:4
Lem=alpha(exp(-(XX1(i,:)-Bad_particle(1,j)+1)/(best_particle(1,j)-Bad_particle(1,j)+1)));
end
Lemda
end

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 4 月 17 日
Your exp() term is being used to subscript the variable alpha but it is unlikely that exp() just happen to work out as exactly an integer.
Perhaps you want to multiply alpha by something.
There is a MATLAB function named alpha ,but it cannot return any values.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by