Native Matlab boundary function not working, can someone run it please :)
13 views (last 30 days)
Hi all, I am trying to find the boundary to a set of points and I found a function called 'boundary' but I get an error when I try to run it.
The link to the function: http://www.mathworks.se/help/matlab/ref/boundary.html?searchHighlight=boundary
edit: I assume this is a native function because I cant tell if it belongs to specific toolbox.
According to the example in the help, this is the code that is given:
Create and plot a set of random 2-D points.
x = gallery('uniformdata',30,1,1);
y = gallery('uniformdata',30,1,10);
Compute a boundary around the points using the default shrink factor.
k = boundary(x,y);
When I try to run the above code (direct copy and paste from the document), I get this error:
Undefined function 'boundary' for input arguments of type 'double'.
To check if the function exists, I typed
I get this
>> help boundary
--- help for piecewisedistribution/boundary ---
boundary Boundary between segments of piecewise distribution.
[P,Q]=boundary(OBJ) returns the boundary points between the segments
of the piecewise distribution defined by OBJ. P is a vector of the
probability values at each boundary. Q is a vector of the quantile
values at each boundary.
[P,Q]=boundary(OBJ,J) returns P and Q for the Jth boundary.
See also piecewisedistribution, piecewisedistribution/nsegments.
Reference page in Help browser
I see that the help doc is for 2014a and I am on 2013a but the fact that it shows up when I type help boundary and it returns text is boggling. Doesnt this mean that the function is somewhere on my Matlab install?
I also asked a colleague to run it on her computer (2012a) and she gets the same errors.
A Jenkins on 3 Nov 2014
Those are not the same boundary function, as you can see because the help descriptions are different.
The boundary you have installed is a method of the piecewisedistribution object, and thus must be called on an object of that class.
The help for that function shows the following example, which is probably not what you want: