Le mardi 24 février 2015 à 00:46 -0800, Grunde Waag a écrit : > Hi, > I have an array, for instance x = linspace(0, 10, 20);, and I want to > find the index for which x==1 and then change the value of x at that > index. > > > In Matlab this is easy: x(x==0) = 100; > > > What is the best way to do this in julia! Simply x[x .== 0] = 100
You can have a look at the manual for more details about the difference between == and .== in Julia. Regards
