[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API |
Date: |
Sat, 12 Aug 2017 11:09:41 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #12, bug #51725 (project octave):
I also did some tests with NULL pointers to mxArray to see how they should
behave. It would be *very* good if someone could test in Matlab to see if
Octave is compatible. The summary is that a NULL pointer seems to yield an
empty 0x0 matrix.
nulltst.c:
#include "mex.h"
void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
if (nlhs < 1)
mexErrMsgTxt ("Must have at least one output");
mexPrintf ("plhs[0] initialized to %ld\n", plhs[0]);
plhs[0] = NULL;
}
And when executed
octave:1> mex nulltst.c
octave:2> x = nulltst
plhs[0] initialized to 0
x = [](0x0)
octave:3> [x,y,z] = nulltst
plhs[0] initialized to 0
x = [](0x0)
y = [](0x0)
z = [](0x0)
So it seems that the plhs array of pointers is always initialized to 0 (NULL).
And that the interpretation of a NULL pointer to an mxArray is always an
empty double matrix in Octave.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51725>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, (continued)
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Piotr Held, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Piotr Held, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/11
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API,
Rik <=
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Piotr Held, 2017/08/12
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Piotr Held, 2017/08/14
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/14
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/14
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/14
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, John W. Eaton, 2017/08/14
- [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API, Rik, 2017/08/14