how to write these two equations

1 visualización (últimos 30 días)
Sultan Al Harthy
Sultan Al Harthy el 24 de Mzo. de 2020
Comentada: Sultan Al Harthy el 3 de Abr. de 2020

Respuestas (1)

David Hill
David Hill el 24 de Mzo. de 2020
Not sure what Tj means in the equation.
for k=1:K
for j=1:K
if j~=K
R(j,k)=B/2*log2(1+(h(k)*a(j))^2/(sum((h(k)*a(j+1:K)).^2)+e*sum((h(k)*a(1:j-1)).^2)+1/rho));
else
R(j,k)=B/2*log2(1+(h(K)*a(K))^2/(e*sum((h(K)*a(1:j-1)).^2)+1/rho));
end
end
end
  12 comentarios
David Hill
David Hill el 1 de Abr. de 2020
I assume you are trying to get numeric solutions; therefore, your arrays of (h) and (a) need to be numeric and you need to assign a values to B, K, e, and rho before the above loops can be entered. Additionally, you will want to preallocate R:
R=zeroes(K,K);
Sultan Al Harthy
Sultan Al Harthy el 3 de Abr. de 2020
i am confused

Iniciar sesión para comentar.

Categorías

Más información sobre Programming 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!

Translated by