程序报错下标索引必须为正整数类型或逻辑类型。
显示 更早的评论
% 更新接收器收到的光强
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;
求助这是什么情况
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!