Error while using Symsum

11 visualizaciones (últimos 30 días)
REEMA MOHANTY
REEMA MOHANTY el 3 de Nov. de 2020
Comentada: REEMA MOHANTY el 3 de Nov. de 2020
Error using sym/symsum (line 54)
Unable to compute sum with respect to '1'. Summation index must be a symbolic variable.
Error in TIMEVARRYINGMAIZECOBSON2112020 (line 175)
fvalue(1,s) = symsum(f5,s,0,g1)- symsum(f2,s,0, 1)-symsum(f3,s,0, 1)-symsum(f4,s,0, g1) %-symsum(f5,0, gbest(1,s));
here the value of g1= gbest(s,1)

Respuesta aceptada

Walter Roberson
Walter Roberson el 3 de Nov. de 2020
Your variable s has value 1, but what you pass in the second position for symsum() must be a scalar symbolic variable.
  1 comentario
REEMA MOHANTY
REEMA MOHANTY el 3 de Nov. de 2020
Okay.I will check that.
Thank you.

Iniciar sesión para comentar.

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