I do not know if its a symsum function i have to use

1 view (last 30 days)
The operation i have to make it is in the attached file

Accepted Answer

Walter Roberson
Walter Roberson on 24 Apr 2019
Edited: Walter Roberson on 24 Apr 2019
It looks to me as if it is likely that q and t represent vectors that are being indexed. You cannot use symsum() to index a vector. Instead use,
N = n+1;
j = (1:n) + 1;
XF = sum((q(j) - q(j-1)) / q(N) .* log(t(N) - t(j-1)));
The N = n+1 instead of n is present because the formula uses j = 1 : n and which would be when j = 1. MATLAB cannot index by 0, so we need to add 1 to each subscript.
Your tags mention integration, but this does not look like integration to me -- not unless it is Reimann integral of log(t_n - t) with independent variable stored in q ? Trapazoid calculations are generally more accurate than Reimann integral.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!