Filter löschen
Filter löschen

Could anyone help to covert the equation into matlab code

1 Ansicht (letzte 30 Tage)
Barry Allen
Barry Allen am 27 Feb. 2020
Kommentiert: Barry Allen am 27 Feb. 2020
How to convert this into code?
  2 Kommentare
darova
darova am 27 Feb. 2020
You can't convert it. YOu should write your own code
Did you try?
Barry Allen
Barry Allen am 27 Feb. 2020
Bearbeitet: Barry Allen am 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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

David Hill
David Hill am 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 Kommentare

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by