Could anyone help to covert the equation into matlab code

1 view (last 30 days)
How to convert this into code?
  2 Comments
darova
darova on 27 Feb 2020
You can't convert it. YOu should write your own code
Did you try?
Barry Allen
Barry Allen on 27 Feb 2020
Edited: Barry Allen on 27 Feb 2020
Yes
for i =2:N
x=1+((Pi(i).*yi(i))./1+sum(Pi*yi(3:N)));
result=log2(x);
y=sum(result);
end

Sign in to comment.

Accepted Answer

David Hill
David Hill on 27 Feb 2020
Not sure what arrays p and g should be.
B=sum(log(1+(p(2:n).*g(2:n))./(1+arrayfun(@(x)sum(x*g(3:n)),p(2:n))))/log(2));
  7 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!