Reputation: 51
I have matrix A and B
A = [NaN NaN 0 NaN 1 NaN NaN]
B = [0 0 1 0 0 0 0]
I want do a index masking, replace '0' with NaN by looking at matrix A index. How do script it so that my expected result would like this below.
C = [NaN NaN 1 NaN 0 NaN NaN]
Upvotes: 1
Views: 35