%% Uncertain Real Parameter with Symmetric Range
% For uncertain real parameters whose range is symmetric about their nominal value, the normalized distance is intuitive, scaling linearly with the numerical difference from the uncertain real parameter's nominal value.
% Create uncertain real parameters with a range that is symmetric about the nominal value, where each end point is 1 unit from the nominal. Points that lie inside the range are less than 1 unit from the nominal, while points that lie outside the range are greater than 1 unit from the nominal.

a = ureal('a',3,'range',[1 5]); 
NV = actual2normalized(a,[1 3 5])

%

NV = actual2normalized(a,[2 4])

%

NV = actual2normalized(a,[0 6])

%
% Plot the normalized values and normalized distance for several values.

values = linspace(-3,9,250); 
[nv,ndist] = actual2normalized(a,values); 
plot(values,nv,'r.',values,ndist,'b-')

% Copyright 2015 The MathWorks, Inc.