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 Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by