# Question with a Possible Assignment Error

**URL:** <https://community.wolfram.com/t/question-with-a-possible-assignment-error/2824>\
**Category:** Questions\
**Tags:** biological-sciences, chemistry, mathematica\
**Created:** [July 31, 2014, 9:49pm UTC](https://community.wolfram.com/t/question-with-a-possible-assignment-error/2824 "2014-07-31T21:49:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshwofford](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@joshwofford](https://community.wolfram.com/u/joshwofford)\
**Post date:** [July 31, 2014, 9:49pm UTC](https://community.wolfram.com/t/question-with-a-possible-assignment-error/2824/1 "2014-07-31T21:49:53Z")

</div>

I am having trouble with this loop I am running. For the second row, the last column should be reading .130004, but instead it is reading a value on the order of 10^11. I believe I have comitted a logic error in assigning something but can’t figure out where I did it. Code is attached as the sample code option for the text body is rather ugly. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![sukrause](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sukrause/32/41348_2.png) [@sukrause](https://community.wolfram.com/u/sukrause)\
**Post date:** [August 1, 2014, 4:40pm UTC](https://community.wolfram.com/t/question-with-a-possible-assignment-error/2824/2 "2014-08-01T16:40:06Z")

</div>

Your original result is

```
{{4, 11.7091, 199.343, 120.673, 111.059, 333.177, 45.0331, 0.405488, 9.65393, 0.145652}, 
 {16, 17.1087, 70.3552, 808.172, 125.148, 375.443, 45.0331, 0.35984, 64.6538, 3.64047*10^11}, 
 {46, 22.9638, 36.1029, 962.234, 134.625, 403.876, 45.0331, 0.334507, 76.9787, 0.492417}, 
 {106, 27.2876, 35.1191, 1016.53, 139.858, 419.574, 45.0331, 0.321992, 81.3224, 0.144318}}

```

if the notebook is evaluated for the first time, then the result is (Mathematica 10.0.0, Window 7 64 Bit):

```
{{4, 11.7091, 199.343, 120.673, 111.059, 333.177, 45.0331, 0.405488, 9.65393, 3.64047*10^11}, 
{16, 17.1087, 70.3552, 808.172, 125.148, 375.443, 45.0331, 0.35984, 64.6538, 3.64047*10^11}, 
{46, 22.9638, 36.1029, 962.234, 134.625, 403.876, 45.0331, 0.334507, 76.9787, 0.492417}, 
{106, 27.2876, 35.1191, 1016.53, 139.858, 419.574, 45.0331, 0.321992, 81.3224, 0.144318}}

```

if the notebook is evaluated again in the same session, it results in

```
{{4, 11.7091, 199.343, 120.673, 111.059, 333.177, 45.0331, 0.405488, 9.65393, 0.145652}, 
{16, 17.1087, 70.3552, 808.172, 125.148, 375.443, 45.0331, 0.35984, 64.6538, 3.64047*10^11}, 
{46, 22.9638, 36.1029, 962.234, 134.625, 403.876, 45.0331, 0.334507, 76.9787, 0.492417},
{106, 27.2876, 35.1191, 1016.53, 139.858, 419.574, 45.0331, 0.321992, 81.3224, 0.144318}}

```

which is in fact your result. Further evaluations do not change that.

Next observation: rmsd does not belong to the variables for NDSolve[].

---

<div class="post-metadata">

**Author:** ![sukrause](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sukrause/32/41348_2.png) [@sukrause](https://community.wolfram.com/u/sukrause)\
**Post date:** [August 1, 2014, 5:11pm UTC](https://community.wolfram.com/t/question-with-a-possible-assignment-error/2824/3 "2014-08-01T17:11:54Z")

</div>

It’s rewritten a bit and now the high value is constantly in the first row, independent from the number of evaluations in a session. The results from the differential equation look similiar to each other, but the fef3 varies wildly: For nut =4 there is fef3 = 0.0001, the other nut’s have fef3’s in the order of 1000. For the first solution the vars2[[4]] is 111.059 and the term with fef3 from rmsd explains your trouble in my eyes:

```
In[3]:= (111.059/0.0001)^2
Out[3]= 1.23341*10^12

```

Please find the notebook attached.
