I need to make a system of N differential equations with N functions dependant on symbolic matht or other variable + Border Conditions. and solve it.
What I tried to do:
% dimension. in principle N can be any bigN = 3;% matrix of coefficients. here I set it manually for simplicitya = [1, 2, 3; 4, 5, 6; 7, 8, 9];% make a set of N variablesb = sym('x_%d', [N, 1]);for i = 1 : Neqns(i) = sum(a(i, :) * b(:)) == diff(b(i));end
But as far as I do not use syms manually like that:
syms t x_1(t) x_2(t) x_3(t)
MatLab doesn't know that my variable should depend on t and therefore diff(b(i)) = 0 always. I don't even know how to set the Border Conditions this way, because MatLab doesn't let me make a matrix of conditions conds, where I could index the number of condition and set t = 0 at the same time.
Is there a solution to this issue?