calling isosurface without specifying isovalue

4 views (last 30 days)
Hi,
If i call isosuface without specifying the isovalue what is the lower limit of values with which the surface is created?
I can see that it is not zero because with my data if i call isosurface with isovalue = 0 i get a different result compared to isovalue = []
Thanks
matt
  1 Comment
Matthew O'Brien
Matthew O'Brien on 8 Sep 2011
Does anyone have an answer for this? How is the isovalue determined when it is not defined by the user?
Thanks
Matt

Sign in to comment.

Answers (1)

Grzegorz Knor
Grzegorz Knor on 8 Sep 2011
When the isovalue is not defined Matlab determines it by calling isovalue function.
type isovalue
returns the following code:
function val = isovalue(data)
%ISOVALUE Isovalue calculator.
% VAL = ISOVALUE(V) calculates an isovalue from data V using hist
% function. Utility function used by ISOSURFACE and ISOCAPS.
% Copyright 1984-2002 The MathWorks, Inc.
% $Revision: 1.6 $ $Date: 2002/06/17 13:37:43 $
% only use about 10000 samples
r = 1;
len = length(data(:));
if len > 20000
r = floor(len/10000);
end
[n x] = hist(data(1:r:end),100);
% remove large first max value
pos = find(n==max(n));
pos = pos(1);
q = max(n(1:2));
if pos<=2 & q/(sum(n)/length(n)) > 10
n = n(3:end);
x = x(3:end);
end
% get value of middle bar of non-small values
pos = find(n<max(n)/50);
if length(pos) < 90
x(pos) = [];
end
val = x(floor(length(x)/2));

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!