# How can I view W matrix evaluation times and the W matrices themselves?

**URL:** <https://discourse.julialang.org/t/how-can-i-view-w-matrix-evaluation-times-and-the-w-matrices-themselves/107301>\
**Category:** New to Julia\
**Tags:** ode, differentialequation\
**Created:** [December 7, 2023, 8:40pm UTC](https://discourse.julialang.org/t/how-can-i-view-w-matrix-evaluation-times-and-the-w-matrices-themselves/107301 "2023-12-07T20:40:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![novalex98](https://avatars.discourse-cdn.com/v4/letter/n/bb73d2/32.png) [@novalex98](https://discourse.julialang.org/u/novalex98)\
**Post date:** [December 7, 2023, 8:40pm UTC](https://discourse.julialang.org/t/how-can-i-view-w-matrix-evaluation-times-and-the-w-matrices-themselves/107301/1 "2023-12-07T20:40:17Z")

</div>

I’m trying to solve a stubbornly unstable nonlinear ODE. When I plot the terms of my ODE its fairly obvious what time step things start to go wrong at.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/2/e/2e07b449305b4e659f5a0182d7c89af6bbed21a5.png)

As seen in this graph, everything starts to fall apart at z = 35.98623151025863, time step 14417.

I’m trying to figure out why, so I want to view the W matrix before this time step and immediately after. Ideally, I’d like to understand how the W matrix is computed, and perhaps pass an analytical W matrix to the system. Any advice on how to do this?

Edit: this thread [ODE solver stats - #2 by ChrisRackauckas](https://discourse.julialang.org/t/ode-solver-stats/30150/2) defines W = I – gamma\*J but it doesn’t say anything about figuring out when W matrices are computed, viewing their values, or how I can pass in my own

---

<div class="post-metadata">

**Author:** ![novalex98](https://avatars.discourse-cdn.com/v4/letter/n/bb73d2/32.png) [@novalex98](https://discourse.julialang.org/u/novalex98)\
**Post date:** [December 8, 2023, 7:16pm UTC](https://discourse.julialang.org/t/how-can-i-view-w-matrix-evaluation-times-and-the-w-matrices-themselves/107301/2 "2023-12-08T19:16:24Z")

</div>

I solved my problem. Having the ability to view the W matrix and when it gets solved still seems like a useful function. I was able to get the data I needed using a nonlinear solver with the options set to evaluate the Jacobian at every iteration, and that helped me find the issue.
