Hi,(adsbygoogle = window.adsbygoogle || []).push({});

I have a bunch of closed differential equations that I want to solve. The variables of the DEs are 2x2 matrices. So, I want to enter some 2x2 matrices of variables and then use NDSolve to get the solution.

How should I define a 2x2 matrix with four variables inside it? I tried

matrix[a_, b_, c_, d_] := {{a, b}, {c,d}} but this doesn't work. Rather embarassingly, I can't find the solution after quite a bit of googling.

Thank you for your help!

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Defining matrix of variables in mathematica and solving matrix differential equation

Loading...

Similar Threads - Defining matrix variables | Date |
---|---|

Maple question: defining functions as inverse Fourier transforms | Jun 21, 2016 |

Trying to define a integrating function in Mathematica | Jun 11, 2016 |

Plotting an integral-defined function in MATLAB | Aug 5, 2015 |

Mathematica Globally Define Variable as Real | Nov 3, 2014 |

Defining one matrix in terms of another in Mathematica with FOR loop | Oct 24, 2011 |

**Physics Forums - The Fusion of Science and Community**