程序报错下标索引必须为正整数类型或逻辑类型。
Mostrar comentarios más antiguos
% 更新接收器收到的光强
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;
求助这是什么情况
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!