symsum and subscript. confirmation regarding limit for sum

2 visualizzazioni (ultimi 30 giorni)
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

Risposte (0)

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Tag

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by