Could anyone help to covert the equation into matlab code

1 次查看(过去 30 天)
How to convert this into code?
  2 个评论
darova
darova 2020-2-27
You can't convert it. YOu should write your own code
Did you try?
Barry Allen
Barry Allen 2020-2-27
编辑:Barry Allen 2020-2-27
Yes
for i =2:N
x=1+((Pi(i).*yi(i))./1+sum(Pi*yi(3:N)));
result=log2(x);
y=sum(result);
end

请先登录,再进行评论。

采纳的回答

David Hill
David Hill 2020-2-27
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 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by