Symbolic substitution for variable subscripts

조회 수: 3 (최근 30일)
Hau Kit Yong
Hau Kit Yong 2019년 9월 5일
댓글: Walter Roberson 2019년 9월 5일
How should I perform the following substitution: ? Can the subs function be used? Or do I have to take a manual approach and use sprintf into a char representation of the expression before converting it to symbolic form?
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 9월 5일
Supposing your a is to be 17 x 3, then
a = sym('a', [17 3]);
and then for any given numeric subscript j, sum(a(j,:))
However it is not possible to create the sum when j is symbolic

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by