MATLAB Answers

How to do write the codes for this summation problem?

1 view (last 30 days)
MD. Rokibujjaman sovon
MD. Rokibujjaman sovon on 22 Oct 2020
How to write the codes for this.
where
n=5
T=[0.56, 0.23, 1.58, 2.69, 1.1]
Thank you.

  0 Comments

Sign in to comment.

Answers (1)

Alan Stevens
Alan Stevens on 22 Oct 2020
Having defined n and T then
B = 1./(log(T) - mean(log(T)));
Note that in Matlab, log is log to base e.

  10 Comments

Show 7 older comments
MD. Rokibujjaman sovon
MD. Rokibujjaman sovon on 22 Oct 2020
I tired to use
T=[0.56; 0.23; 1.58; 2.69; 1.1]
B = 1./(log(T) - sum(log(T)));
Alan Stevens
Alan Stevens on 22 Oct 2020
It works for me:
>> T=[0.56; 0.23; 1.58; 2.69; 1.1];
B = 1./(log(T) - sum(log(T)))
B =
-13.7741
-1.0390
1.0367
0.6681
1.6597
Look in the Workspace window to see the values, or remove the semicolon to see the values in the command window.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!