symsum and subscript. confirmation regarding limit for sum

2 visualizaciones (últimos 30 días)
Mustafa Bayramov
Mustafa Bayramov el 21 de Abr. de 2022
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

Respuestas (0)

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by