
Matlab’s command:
>> d_div1=-3:1.5:3, d_div2=1:5
>> d_div2./d_div2, d_div1./d_div2, d_div2./5
Matlab’s response:
d_div1 =
-3.0000 -1.5000 0 1.5000 3.0000
d_div2 =
1 2 3 4 5
ans =
1 1 1 1 1
ans =
-3.0000 -0.7500 0 0.3750 0.6000
ans =
0.2000 0.4000 0.6000 0.8000 1.0000
Comments:
Examples of dot division.
Matlab’s command:
>>d_div2./d_div1
>> d_div2(3)=0; d_div1./d_div2
>> 1/d_div1
Matlab’s response:
Warning: Divide by zero.
(Type "warning off MATLAB:divideByZero" to suppress this
warning.)
ans =
-0.3333 -1.3333 Inf 2.6667 1.6667
Warning: Divide by zero.
(Type "warning off MATLAB:divideByZero" to suppress this
warning.)
ans =
-3.0000 -0.7500 NaN 0.3750 0.6000
??? Error using ==> /
Matrix dimensions must agree.
Comments:
hological results of dot division. In the first case,
Matlab returns the result after displaying a warning concerning
the division of a number with zero that leads to an infinity
quantity. Observe that Matlab returns an
I
I
n
n
f
f for such operations.
Likewise, in the second case, the division of 0/0 is not defined
is returned in the vector. In the third
Comentários a estes Manuais