symsum and subscript. confirmation regarding limit for sum
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi Folks,
I check the forum, and I see in the answers that subscript for variable that inside a sum term can not be a symbolic. But I just want confirm the code below.
I can't use n as symbolic variable simularly in example below.
Note i just it just index.
syms h(x)
n = 3;
syms k real positive
x = [sym('x_0'), sym('y_%d', [1, n])];
y = [sym('x_0'), sym('y_%d', [1, n])];
1-k/2 * n * symsum(1/k * (y(n).*log(h(x(n))) + (1-y(n)).*log(h(x(n)))), 1, n)
Thank you
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!