calling isosurface without specifying isovalue

1 回表示 (過去 30 日間)
Matthew O'Brien
Matthew O'Brien 2011 年 9 月 7 日
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 件のコメント
Matthew O'Brien
Matthew O'Brien 2011 年 9 月 8 日
Does anyone have an answer for this? How is the isovalue determined when it is not defined by the user?
Thanks
Matt

サインインしてコメントする。

回答 (1 件)

Grzegorz Knor
Grzegorz Knor 2011 年 9 月 8 日
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));

カテゴリ

Help Center および File ExchangeScalar Volume Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by