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 Center および File ExchangeLogical についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by