writing equation in matlab

1 view (last 30 days)
How to write the equation of image in matlab.
The parameters of the image are i->number of users; gamma is the normalized channel gain

Accepted Answer

Walter Roberson
Walter Roberson on 29 Dec 2017
Edited: Walter Roberson on 29 Dec 2017
r = @(i) omega * beta * log2(1 + P(i)*gamma(i) / sum( P(1:i-1) .* gamma(i) + omega) )
It is not entirely clear to me whether the omega is included in the summation term or not.
  7 Comments
jaah navi
jaah navi on 17 Jan 2018
Ok. I have used that command in my code
P=sort(B)
G=sort(A,'descend')
for i =1:size(P,1)
r = @(i) Bmax*log2(1+(P(i).*G(i))/((sum(P(1:i-1)).*G(i))+noise))
end
If I run the code I am getting
r =
@(i)Bmax*log2(1+(P(i).*G(i))/((sum(P(1:i-1)).*G(i))+noise))
r =
@(i)Bmax*log2(1+(P(i).*G(i))/((sum(P(1:i-1)).*G(i))+noise))
r =
@(i)Bmax*log2(1+(P(i).*G(i))/((sum(P(1:i-1)).*G(i))+noise))
Could you please tell me how can the values of P and G matrix can be substituted in r.
Walter Roberson
Walter Roberson on 17 Jan 2018
P=sort(B)
G=sort(A,'descend')
for i =1:size(P,1)
r(i) = Bmax*log2(1+(P(i).*G(i))/((sum(P(1:i-1)).*G(i))+noise))
end

Sign in to comment.

More Answers (1)

Kristopher Yaryan
Kristopher Yaryan on 28 Nov 2020
A particle moves with position function
s=t^44t^320t^3+20t,t0
a) At what time does the particle ha a velocity of 20 m/s?
b) At what time is the acceleration 0? What is the significance of this value t?
  1 Comment
Walter Roberson
Walter Roberson on 28 Nov 2020
This is not an Answer to jaah navi's question. You should create your own Question. But first read Ask

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!