include(`../prg/vector.txt'):

`Return element [y],[z] from matrix [x]':
func(melem,{
  elem(elem([x],[y]),[z])}):

`Transpose a matrix':
func(mtrans,{
  smooth(<sub({let(a,[x]):print_
    for(<i,1,len(elem([a],1)),1>,{
      column([a],[i]),})})>)}):

`Augment matrix [y] to the right of [x]':
func(maug,{smooth(<sub({
  let(k,1):
  len([x]):do:
    print_stack(elem([x],[k]),elem([y],[k])),:
    let(k,[k]+1):loop})>)}):

`Remove row [y] and column [z] from matrix [x]':
func(submatrix,{smooth(
  mtrans(smooth(
  replace(mtrans(smooth(
  replace([x],[y],))),[z],))))}):

`Replace element [y],[z] in matrix [x] with [t]':
func(mreplace,{
  replace([x],[y],replace(
    elem([x],[y]),[z],[t]))}):

`Replace column [y] of matrix [x] with vector [z]':
func(mrepcol,{
  mtrans(replace(mtrans([x]),[y],[z]))}):

print_`matrix.txt',: