MF_Pelement MD_Pelement ME_Pelement
MCF_Pelement MCD_Pelement MCE_Pelement
Functionget pointer to a matrix element
Syntax C/C++#include <MFstd.h>
float * MF_Pelement( fMatrix X, ui ht, ui len, unsigned m, unsigned n );
C++ MatObj#include <OptiVec.h>
T * matrix<T>::Pelement( const unsigned m, const unsigned n );
Pascal/Delphiuses MFstd;
function MF_Pelement( MA:fMatrix; ht, len, m, n:UIntSize ): PSingle;
DescriptionA pointer to the element MAm,n is returned.
This function is needed to access elements of dynamically allocated matrices, for which older versions of Borland C++ had a pointer arithmetics bug, and Pascal/Delphi - unlike C - does not provide an own mechanism at all. Writing a matrix element through this function, use the dereferenced-pointer syntax:
C/C++*MF_Pelement( MA, ht, len, m, n ) = 3.5;
Pascal/DelphiMF_Pelement( MA, ht, len, m, n )^ := 3.5;

Read-only access to matrix elements is provided by the related function, MF_element

Return valuepointer to the matrix element MAm,n
See alsoMF_element,   chapter 2

MatrixLib Table of Contents  OptiVec home