Error while using Symsum

조회 수: 10 (최근 30일)
REEMA MOHANTY
REEMA MOHANTY 2020년 11월 3일
댓글: REEMA MOHANTY 2020년 11월 3일
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)

채택된 답변

Walter Roberson
Walter Roberson 2020년 11월 3일
Your variable s has value 1, but what you pass in the second position for symsum() must be a scalar symbolic variable.
  댓글 수: 1
REEMA MOHANTY
REEMA MOHANTY 2020년 11월 3일
Okay.I will check that.
Thank you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by