@sym: f = subsasgn (f, idx, rhs) ¶@sym: f(i) = rhs ¶@sym: f(i, j) = rhs ¶@sym: f(i:j) = rhs ¶@sym: f(x) = symexpr ¶Assign to entries of a symbolic array.
Examples:
A = sym([10 11 12]); A(3) = 44 ⇒ A = (sym) [10 11 44] (1×3 matrix) A(1:2) = [42 43] ⇒ A = (sym) [42 43 44] (1×3 matrix) A(1, 1) = 41 ⇒ A = (sym) [41 43 44] (1×3 matrix)
This method also gets called when creating @symfuns:
syms x
f(x) = 3*x^2
⇒ f(x) = (symfun)
2
3⋅x
See also: @@sym/subsref, @@sym/subindex, @@sym/end, symfun.
Package: symbolic