## $%MTXCOF^MATH## M[UMPS] by Example |

Approved for inclusion in a future M[UMPS] language standard as part of the library for Matrix Mathematics.

This function calculates the cofactor in a square matrix of an element in that matrix. The function value is the value of the cofactor.

This function is internally used to compute the value of a determinant, but may also be called directly.

Assuming that matrix `DEMO` contains:

2 1 –1 2 1 3 2 –3 –1 2 1 –1 2 –3 –1 4

this function will return:

Reference | Value | |
---|---|---|

$%MTXCOF^MATH(.DEMO,1,1,4) |
–4 | |

$%MTXCOF^MATH(.DEMO,1,2,4) |
10 | |

$%MTXCOF^MATH(.DEMO,1,3,4) |
14 | |

$%MTXCOF^MATH(.DEMO,1,4,4) |
2 | |

$%MTXCOF^MATH(.DEMO,2,1,4) |
10 | |

$%MTXCOF^MATH(.DEMO,2,2,4) |
2 | |

$%MTXCOF^MATH(.DEMO,2,3,4) |
10 | |

$%MTXCOF^MATH(.DEMO,2,4,4) |
4 | |

$%MTXCOF^MATH(.DEMO,3,1,4) |
14 | |

$%MTXCOF^MATH(.DEMO,3,2,4) |
10 | |

$%MTXCOF^MATH(.DEMO,3,3,4) |
–22 | |

$%MTXCOF^MATH(.DEMO,3,4,4) |
20 | |

$%MTXCOF^MATH(.DEMO,4,1,4) |
2 | |

$%MTXCOF^MATH(.DEMO,4,2,4) |
4 | |

$%MTXCOF^MATH(.DEMO,4,3,4) |
20 | |

$%MTXCOF^MATH(.DEMO,4,4,4) |
–10 |

The MDC has approved code to approximate the return value of this function.
Implementors are encouraged to provide more accurate and efficient code).

Click here for $%MTXCOF^MATH sample code to
view or download the code for this function.

Click here for AllFunctions to view
or download the code for all M[UMPS] Library Functions.

Copyright © Standard Documents; 1977-2017 MUMPS Development Committee;

Copyright © Examples: 1995-2017 Ed de Moel;

Copyright © Annotations: 2003-2017 Jacquard Systems Research.

*The information in this page is
NOT authoritative and subject to be modified
at any moment.Please consult the
appropriate (draft) language standard for an
authoritative definition.*

*Some specifications are "approved
for inclusion in a future standard". Note
that the MUMPS Development Committee cannot
guarantee that such future standards will
indeed be published.*

This page most recently updated on 12-Sep-2014, 12:49:17 .

For comments, contact Ed de Moel (demoel@jacquardsystems.com)