There are often many different ways to write the same algebraic expression. As one example, the expression (1+x)^2 can be written as 1+2x+x^2. Mathematica provides a large ...
There are many ways to use symbols in Mathematica. Here we use symbols as 'tags' for different types of objects. Working with physical units gives one simple example. When ...
mcomplex*MTensor_getComplexData (MTensor t) gets an array of the data elements of an MTensor of complex type.
int MTensor_getComplex (MTensor t, mint*pos, mcomplex*pres) gets a single element of an MTensor of complex type.
mint*MTensor_getIntegerData (MTensor t) gets an array of the data elements of an MTensor of integer type.
double*MTensor_getRealData (MTensor t) gets an array of the data elements of an MTensor of real type.
int MTensor_getInteger (MTensor t, mint*pos, mreal*pres) gets a single element of an MTensor of real type.
void MTensor_setInteger (MTensor t, mint*pos, mint value) sets a single element of an MTensor of integer type.
int MTensor_setReal (MTensor t, mint*pos, mreal value) sets a single element of an MTensor of real type.
An important subset of optimization problems is constrained nonlinear optimization, where the function is not linear and the parameter values are constrained to certain ...