![]() |
timesPURPOSE
Element-size product of two matrices (operator: .*).
SYNOPSIS
function Iout=times(I1,I2)
DESCRIPTION
Element-size product of two matrices (operator: .*). Element-by-element multiplication of two interval matrices, I1, I2. It accepts mixed real/interval matrices as inputs. CROSS-REFERENCE INFORMATION
This function calls:
SOURCE CODE
0001 function Iout=times(I1,I2) 0002 % Element-size product of two matrices (operator: .*). 0003 % 0004 % Element-by-element multiplication of two interval matrices, I1, I2. 0005 % It accepts mixed real/interval matrices as inputs. 0006 0007 if isa(I1,'double') 0008 m1=I1.*I2.lower; 0009 m2=I1.*I2.upper; 0010 Iout.lower=min(m1,m2); 0011 Iout.upper=max(m1,m2); 0012 [Iout.r Iout.c]=size(Iout.lower); 0013 Iout=class(Iout,'Interval'); 0014 else 0015 if isa(I2,'double') 0016 m1=I1.lower.*I2; 0017 m2=I1.upper.*I2; 0018 Iout.lower=min(m1,m2); 0019 Iout.upper=max(m1,m2); 0020 [Iout.r Iout.c]=size(Iout.lower); 0021 Iout=class(Iout,'Interval'); 0022 else 0023 m1=I1.lower.*I2.lower; 0024 m2=I1.lower.*I2.upper; 0025 m3=I1.upper.*I2.lower; 0026 m4=I1.upper.*I2.upper; 0027 Iout.lower=min(m1,min(m2,min(m3,m4))); 0028 Iout.upper=max(m1,max(m2,max(m3,m4))); 0029 [Iout.r Iout.c]=size(Iout.lower); 0030 Iout=class(Iout,'Interval'); 0031 end 0032 end |