程序报错下标索引必须为正整数类型或逻辑类型。
Show older comments
% 更新接收器收到的光强
r_idx = floor(sqrt(x^2 + y^2) / dr) + 1;
z_idx = floor(z / dz) + 1;
if r_idx <= length(r_bins) && z_idx <= length(z_bins)
received_power(z_idx, r_idx) = received_power(z_idx, r_idx) + I;
end
报错信息:下标索引必须为正整数类型或逻辑类型
出错 jg (line 37)
received_power(z_idx, r_idx) = received_power(z_idx, r_idx) + I;
求助这是什么情况
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!