How can I define an array of symbolic functions?
121 views (last 30 days)
Sara Linares on 8 Feb 2020
I want to make an array a1(t) a2(t)... an(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.
Walter Roberson on 8 Feb 2020
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.