how to do convolution of two arrays in 3d?
5 views (last 30 days)
i am trying to do convolution between a 371x391x23 and 371x391x23 array. however when i used convn, the output which i got had only Nan values in it. one of the input array has some Nan values in it. is it because of that the output also became Nan? kindly help me to solve it.
Walter Roberson on 27 Dec 2021
Yes, a single nan can pollute more than 95% of the output of a matrix with those dimensions, if it happens to be at the center of the array.
There is pretty much no point is doing a convolution with nan values present
Matt J on 27 Dec 2021
Edited: Matt J on 28 Dec 2021
Consider overwriting the NaNs with zeros
or more sophisticated missing data inpainting routines offered on the file exchange, e.g.,