Bug confirmed. The constructor:
new Matrix( Matrix A[, int startRow, int startCol, int rows, int cols] )
and the method:
void Matrix.assign( Matrix A[, int startRow, int startCol, int rows, int cols] )
are broken. This is a regression in the latest versions of PixInsight 1.8. I'll fix this in the next version. In the meanwhile, you can use the following workaround:
Matrix.prototype.clone = function()
{
return (new Matrix( 0, this.rows, this.columns )).add( this );
};
Example:
var m1 = new Matrix([1, 0, 0, 2], 2, 2);
var m2 = m1.clone();
Sorry for the trouble.