I have a matrix as below:
A = [1 2 3; 4 5 6];
I need to find the index of those that meet these requirements
Ind = map(A) do a
(a > 4) || (a <3);
end
Here are the results:
2×3 Matrix{Bool}:
1 1 0
0 1 1
Everything has been working so far. My goal is to replace all those elements with a new number 88. Why didn’t the below script work?
A[Ind] .= 88;
I’m supposed to get a new matrix like this:
88 88 3
4 88 88
But the results Julia gives me is as below:
88
88
88
88
How should I archive my goal in this case? Many thanks!