shivax
2018-10-28 18:12:24 UTC
hi
look that:
max=50;
min=-50;
newArr=[3 4 inf 7 3 2 5 6 inf -inf 9]
i want to assign to inf value max..and to -inf value -1 ==>[3 4 50 7 3 2 5
6 50 -50 9]
i try this:
isInf=find(isinf(newArr))
newArr2(isInf)=max;
but is not correct beacuse isinf(array) give me index of inf and -inf
can you write me other method? thank
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
look that:
max=50;
min=-50;
newArr=[3 4 inf 7 3 2 5 6 inf -inf 9]
i want to assign to inf value max..and to -inf value -1 ==>[3 4 50 7 3 2 5
6 50 -50 9]
i try this:
isInf=find(isinf(newArr))
newArr2(isInf)=max;
but is not correct beacuse isinf(array) give me index of inf and -inf
can you write me other method? thank
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html