Hi guys, I am trying to set value for different page of 3D matrix based on 2D matrix logical command.
After running the above code, we get the following
As you can see, we can easily apply condition1 and condition2 for a 2D array, which is 1st slice of the 3D array, ie domain(:,:,1). Now, based on the condition1 and condition2, I like to use these logical indexes for any slices of the 3D array that i want. In this example, each elements falls within condition 1 a value of 10 for slice 1 to 3, and each elements falls within condition 2 a value of 5 from slice 1 to 2 of the 3D array. You can visualize the results as below picture.
If we are working with 2D array, it would be very simple as: domain(condition1)=10 (assume domain is 2D). How can we use this logical function in 3D array for any slices that I would like to?. Please help. Thank you all.