ERROR: Array indices must be positive integers or logical values. Can anyone please help, Thank You!

1 次查看(过去 30 天)
clc
clear all;
%Parameters defined
PsByN_0dB = 3;
PsByN_0=10.^(PsByN_0dB/10);
UmaxdB = 6.0;
UmaxN_0=10.^(UmaxdB/10);
Qu=[0.1:0.1:2];
QoS_Component_u=10.^(Qu);
for i=1:length(QoS_Component_u)
u=QoS_Component_u(i);
mui(i) = (1/u)*log((PsByN_0*u*exp(-PsByN_0*u)*(expint(PsByN_0*u(u*UmaxN_0+PsByN_0*u)+PsByN_0*u))-((exp(PsByN_0*u(u*UmaxN_0+PsByN_0*u))/(u*UmaxN_0+PsByN_0*u+1))))-(PsByN_0*u*exp(-PsByN_0*u)*(expint(PsByN_0*u(PsByN_0*u)+PsByN_0*u))-(exp(PsByN_0*u*(PsByN_0*u)))/(PsByN_0*u+1)));
end

采纳的回答

Star Strider
Star Strider 2022-5-18
I suspect the problem is with this term —
u(u*UmaxN_0+PsByN_0*u)
and everywhere else something similar to that is used. The value inside the parenthesis is likely not an integer greater than zero, or a logical value.
You will need to determine how best to solve that.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by