Matlab 替换 inf nan 为0
a =
1 NaN 2 3
>> a(isnan(a)) = 123
a =
1 123 2 3
>> a = [1 inf 2 3]
a =
1 Inf 2 3
>> a(a == inf) = 123
a =
1 123 2 3
a =
1 NaN 2 3
>> a(isnan(a)) = 123
a =
1 123 2 3
>> a = [1 inf 2 3]
a =
1 Inf 2 3
>> a(a == inf) = 123
a =
1 123 2 3