📄 matrixinv.3
字号:
.\" Copyright (c) 1987-1990 Entropic Speech, Inc..\" Copyright (c) 1997 Entropic Research Laboratory, Inc. All rights reserved..\" @(#)matrixinv.3 1.9 18 Apr 1997 ESI/ERL.ds ]W (c) 1997 Entropic Research Laboratory, Inc..TH MATRIX_INV 3\-ESPSsp 18 Apr 1997.SH "NAME"matrix_inv \- invert a matrix with single precision.brmatrix_inv_d \- invert a matrix with double precision.SH "SYNOPSIS".B #include <stdio.h>.br.B double matrix_inv (mat_in, inv_out, order).br.B float **mat_in;.br.B float **inv_out;.br.B int order;.br.B double matrix_inv_d (mat_in, inv_out, order).br.B double **mat_in;.br.B double **inv_out;.br.B int order;.SH "DESCRIPTION".PP.I matrix_invinverts an input matrix.I mat_inof order.I orderand stores the result in.I inv_out.If the input matrix is singular to working precision, then the outputmatrix.I inv_outis left unchanged..PPThe two parameters, \fImat_in\fP and \fIinv_out\fP, are interpreted aspointers to matrices of floats (or doubles)containing \fIorder\fP rows and \fIorder\fP columns. Spacefor these matrices must be allocated by the calling program \- such apointer can be assigned by means of \fIarr_alloc\fP(3\-ESPSu)..PP.I matrix_invreturns the condition number of the matrix. If the condition numberis greater than 1e6 for.I matrix_inv,or greater than 1e14 for.I matrix_inv_d,then the matrix is considered singular and \-1.0is returned..PP.I matrix_inv_dis the double precision version of.I matrix_inv..SH "EXAMPLE".PPint order = 4; /* order of matrix to invert */.brfloat **matrix; /* input matrix to invert */.brfloat **inv_matrix; /* inverse matrix *//* allocate memory and initialize matrices */.spif (matrix_inv (matrix, inv_matrix, order) == \-1.0).br /* input matrix is singular to working precision */.brelse.br /* inv_matrix contains the inverse of input matrix */.br.SH DIAGNOSTICS.PP.SH "BUGS".PPNone Known..SH "SEE ALSO".PP.nf\fIarr_alloc\fP(3-\ESPSu).fi.SH REFERENCES[1] Forsythe, G. E., M. A. Malcolm, C. B. Moler (1977), \fIComputer Methods forMathematical Computations\fP. New Jersey: Prentice-Hall, Inc.,51\-55..SH "AUTHOR".PPAjaipal S. Virdy.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -