<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Weird results with MUESLI mfExpm]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=196</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=196&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Weird results with MUESLI mfExpm.]]></description>
		<lastBuildDate>Fri, 17 May 2013 16:47:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Weird results with MUESLI mfExpm]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=783#p783</link>
			<description><![CDATA[<p>Thanks for the update!&nbsp; I couldn&#039;t really address your original problem due to my own unfamiliarity with MUESLI, but it sounds like the problem has been resolved.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Fri, 17 May 2013 16:47:21 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=783#p783</guid>
		</item>
		<item>
			<title><![CDATA[Re: Weird results with MUESLI mfExpm]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=782#p782</link>
			<description><![CDATA[<p>There was actually a bug in MUESLI, which Édouard Canot plans to fix in the next release. The bug was not in mfExpm, but in msDiag, which I used for creating the matrix A. Matrix A was tagged as diagonal, although it was not. That is why mfExpm gave wrong results. One can check the diagonality tag by command mfIsDiag(A). If the value is erroneously true, one can, for example, set some off-diagonal values nonzero before using msDiag.</p>]]></description>
			<author><![CDATA[null@example.com (akemppin)]]></author>
			<pubDate>Fri, 17 May 2013 11:26:54 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=782#p782</guid>
		</item>
		<item>
			<title><![CDATA[Weird results with MUESLI mfExpm]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=776#p776</link>
			<description><![CDATA[<p>I am using MUESLI-2.6.6 (Optimized, DLL) in SF 1.41. I would like to use the mfExpm function to compute time development. Essentially I am solving a differential equation dp/dt = A(t)*p where p is a probability distribution. The transition rates in A(t) can easily vary by 10 orders of magnitude, making the problem very stiff. I try to compute simply: p(t+dt)=exp(A(t)*dt)*p(t). The computation of A(t) is rather complicated and I will not present it here. If A(t) is kept constant in time, A(t)=A, the probability distribution should in long time scales converge to a certain value. In this example, I test this convergence by computing mfExpm(A * very long time). Here is a simplified version of my test program:</p><p>-------<br />integer, parameter :: dp = kind(0.d0)<br />type(mfArray) :: A, Aascii, Ambf<br />real (dp) :: bignumber</p><p>call createtables&nbsp; !This computes matrix A</p><p>bignumber=1.0e10_dp<br />call msDisplay(mfExpm(bignumber*A),&#039;exp(bignumber*A)&#039;)<br />call msSaveAscii(&#039;A.txt&#039;,A)<br />Aascii=mfLoadAscii(&#039;A.txt&#039;)<br />call msDisplay(mfExpm(bignumber*Aascii),&#039;exp(bignumber*Aascii)&#039;)<br />call msSave(&#039;A.mbf&#039;,A)<br />Ambf=mfLoad(&#039;A.mbf&#039;)<br />call msDisplay(mfExpm(bignumber*Ambf),&#039;exp(bignumber*Ambf)&#039;)<br />------------------</p><p>The output is here:<br />---------------------<br /> exp(bignumber*A) =</p><p>&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.1394&nbsp; &nbsp; 0.2664&nbsp; &nbsp; 0.5053&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 0.5053&nbsp; &nbsp; 0.2664<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000</p><br /><p> exp(bignumber*Aascii) =</p><p>&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000</p><br /><p> exp(bignumber*Ambf) =</p><p>&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000&nbsp; &nbsp; 1.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000<br />&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000&nbsp; &nbsp; 0.0000</p><p>-------------------------------</p><p>The first result is clearly wrong, but the next two are correct. I am wondering, how can it be possible, that saving A to a file (either binary or ascii) and loading it helps to obtain correct numerical results?</p>]]></description>
			<author><![CDATA[null@example.com (akemppin)]]></author>
			<pubDate>Wed, 08 May 2013 13:30:08 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=776#p776</guid>
		</item>
	</channel>
</rss>
