You have a symbolic function that returns a vector. Type whos
and you'll see that the class of E
is symfun
. Unfortunately, I don't think that you can directly index into a symbolic function. However, you can convert it into a symbolic expression (class sym
) simply by setting it equal to a new variable and passing in your symbolic variable s
Es = E(s);
Now you should be able to evaluate Es(1)
, Es(2)
, and Es(3)
as you wanted.