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

1 vue (au cours des 30 derniers jours)
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

Réponse acceptée

Star Strider
Star Strider le 18 Mai 2022
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.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by