MATLAB: How to define an array of symbolic functions

arrayfunctionMATLABsymbolic

I want to make an array a1(t) a2(t)… an(t).
syms a(t)
creates a symbolic parameter 't' and 'a' which is an unknown function of 't'. I want an array of just this. How do I do that? I want to use this array to solve a system of ODEs using dsolve.

Best Answer

In MATLAB it not possible to create an array of symbolic functions. If you have even one symbolic function then MATLAB will build a single function that returns an array.
I was looking at this the other day and noticed that diff(a1, x) would produce a function as output but that diff(a1(x), x) would produce an expression. I was wondering whether that made a difference for dsolve purposes and made a mental note to investigate but I did not get around to it yet.