symsum and subscript. confirmation regarding limit for sum
Afficher commentaires plus anciens
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
Réponses (0)
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!