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

1 visualización (últimos 30 días)
MVOGO Fabien
MVOGO Fabien el 24 de Abr. de 2019
Editada: Walter Roberson el 24 de Abr. de 2019
The operation i have to make it is in the attached file

Respuesta aceptada

Walter Roberson
Walter Roberson el 24 de Abr. de 2019
Editada: Walter Roberson el 24 de Abr. de 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.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by