![]() |
plusPURPOSE
Adds two intervals (operator: +).
SYNOPSIS
function Iout=plus(I1,I2)
DESCRIPTION
Adds two intervals (operator: +). Adds two interval matrices, I1, I2. It accepts mixed real/interval matrices as inputs. CROSS-REFERENCE INFORMATION
This function calls:
SOURCE CODE
0001 function Iout=plus(I1,I2) 0002 % Adds two intervals (operator: +). 0003 % 0004 % Adds two interval matrices, I1, I2. 0005 % It accepts mixed real/interval matrices as inputs. 0006 0007 if isa(I1,'double') 0008 Iout.lower=I1+I2.lower; 0009 Iout.upper=I1+I2.upper; 0010 Iout.r=I2.r; 0011 Iout.c=I2.c; 0012 Iout=class(Iout,'Interval'); 0013 else 0014 if isa(I2,'double') 0015 Iout.lower=I1.lower+I2; 0016 Iout.upper=I1.upper+I2; 0017 Iout.r=I1.r; 0018 Iout.c=I1.c; 0019 Iout=class(Iout,'Interval'); 0020 else 0021 Iout.lower=I1.lower+I2.lower; 0022 Iout.upper=I1.upper+I2.upper; 0023 Iout.r=I1.r; 0024 Iout.c=I1.c; 0025 Iout=class(Iout,'Interval'); 0026 end 0027 end |