Error of the following code : "Array indices must be positive integers or logical values."
2 ビュー (過去 30 日間)
% I have attached the file for : "ind" ; "len"; "miu".
% In the following code "line : freq(j)" I am having above mentioned error.
% Any kinds of help to solve the problem will be appreciated.
Nvar = 65536;
freq = zeros(Nvar,1);
for j = 1:Nvar
len = cell2mat(length_ijk(j));
ind = cell2mat(index_ijk(j));
freq(j) = exp(-sum(miu(ind).*len));
回答 (2 件)
Constantino Carlos Reyes-Aldasoro 2022 年 1 月 4 日
Not very clear, what are length_ijk and index_ijk? in the files you have added, miu has 262144 values, ind has 77 and freq has 65536.