Quantcast
Channel: How does NDSolve treat matrices? - Mathematica Stack Exchange
Browsing all 3 articles
Browse latest View live

Answer by Michael E2 for How does NDSolve treat matrices?

An alternative to Indexed to deal with matrices is to prevent f from evaluating until a matrix value is substituted for rho[t]:f[r_?MatrixQ, t_] := r Cos[5 t] + r[[1, 2]] - Tr[r] Exp[t];rho0 = {{1, 2},...

View Article



Image may be NSFW.
Clik here to view.

Answer by andre314 for How does NDSolve treat matrices?

I think that what you want to do with your broken code :f[rho_,t_]:=Table[rho[[n,m]],{n,1,2},{m,1,2}]Cos[t]is something similar to this code :Table[Sum[Indexed[rho, n] Indexed[M, {n, m}], {n, 1, 2}],...

View Article

How does NDSolve treat matrices?

I am having trouble trying to solve a differential equation which couples the elements of a matrix. Let's say I have the followingNDSolve[{D[rho[t],t] == f[rho, t], rho[0]==rho0}, rho, {t, 0, 1}]with...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>