[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45319] mxCreateNumericArray with zero size
From: |
Amro |
Subject: |
[Octave-bug-tracker] [bug #45319] mxCreateNumericArray with zero size |
Date: |
Sun, 14 Jun 2015 09:26:13 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 |
URL:
<http://savannah.gnu.org/bugs/?45319>
Summary: mxCreateNumericArray with zero size
Project: GNU Octave
Submitted by: amro_octave
Submitted on: Sun 14 Jun 2015 09:26:11 AM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: Microsoft Windows
_______________________________________________________
Details:
Take the following MEX-function:
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
plhs[0] = mxCreateNumericArray(0, NULL, mxDOUBLE_CLASS, mxREAL);
}
and run it:
>> out = my_mex_test();
In Octave, this creates a scalar array initialized to 0,
i.e size(out) = [1 1], similar to double(0)
In MATLAB, this creates an empty array,
i.e size(out) = [0 0], similar to double([])
I'm using the official Octave installer, and the latest MATLAB R2015a.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45319>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45319] mxCreateNumericArray with zero size,
Amro <=