ERROR: Array indices must be positive integers or logical values. Can anyone please help, Thank You!
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Dhawal Beohar
el 18 de Mayo de 2022
Respondida: Star Strider
el 18 de Mayo de 2022
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
0 comentarios
Respuesta aceptada
Star Strider
el 18 de Mayo de 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.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!