## Bug #129

### Error in taking the determinant of a matrix if the lower bound is not equal to 1.

Status: | Resolved | Start date: | 12/30/2013 | |
---|---|---|---|---|

Priority: | Urgent | Due date: | 12/30/2013 | |

Assignee: | Steven Martell | % Done: | 100% | |

Category: | ADMB 11 | Estimated time: | 0.20 hour | |

Target version: | ADMB-Trunk |

**Description**

The following code does work:

dmatrix A(1,10,1,10)

... fill A with numbers

det_A = det(A)

The following does not work:

dmatrix A(2,10,2,10)

... fill A with numbers

det_A = det(A)

### History

#### #1 Updated by Steven Martell 9 months ago

The following error is thrown if the lower bound of the square matrix is greater than 1.

matrix bound exceeded -- row index too low in dmatrix::operator()value was1

#### #2 Updated by Steven Martell 9 months ago

Actually the bug only occurs in the dear_matrix

The following code does work:

dvar_matrix A(1,10,1,10)

... fill A with numbers

det_A = det(A)

The following does not work:

dvar_matrix A(2,10,2,10)

... fill A with numbers

det_A = det(A)

#### #3 Updated by Steven Martell 9 months ago

**Due date**set to*12/30/2013***Status**changed from*New*to*Resolved***% Done**changed from*0*to*100***Estimated time**set to*0.20*

Resolved by chaining the lower bound reference in part_prod(1) to part_prod(lb) in the fvar_m20.cpp file