mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-12 22:04:04 +02:00
Merge pull request #229 from adrianVmariano/master
move submatrix to arrays and relax input restrictions
This commit is contained in:
12
math.scad
12
math.scad
@@ -716,18 +716,6 @@ function matrix_inverse(A) =
|
||||
linear_solve(A,ident(len(A)));
|
||||
|
||||
|
||||
// Function: submatrix()
|
||||
// Usage: submatrix(M, ind1, ind2)
|
||||
// Description:
|
||||
// Returns a submatrix with the specified index ranges or index sets.
|
||||
function submatrix(M,ind1,ind2) =
|
||||
assert( is_matrix(M), "Input must be a matrix." )
|
||||
[for(i=ind1)
|
||||
[for(j=ind2)
|
||||
assert( ! is_undef(M[i][j]), "Invalid indexing." )
|
||||
M[i][j] ] ];
|
||||
|
||||
|
||||
// Function: qr_factor()
|
||||
// Usage: qr = qr_factor(A)
|
||||
// Description:
|
||||
|
Reference in New Issue
Block a user