Hi Urmila,
I believe that you are facing an error while upsampling the input and passing it to the custom kernel for GPR. Since, you have upsampled the input, the dimensions of the input changes and leads to the "Arrays have incompatibe sizes for this operation" error. From the error message I believe that it looks like a case of dimension mismatch for the matrix multiplication operation ‘*’. I would suggest you to:
1) Cross check the dimensions of your arrays and ensure that their dimensions are compatible for the matrix multiplication operation. Below mentioned are some documentations that might be useful for you apart from using breakpoints to solve the issue:
- size(): https://www.mathworks.com/help/matlab/ref/size.html and ndims(): https://www.mathworks.com/help/matlab/ref/double.ndims.html to inspect the dimensions of the arrays and confirm they match as expected.
- reshape(): https://www.mathworks.com/help/matlab/ref/reshape.html to rearrange or reshape your arrays to match the required dimensions.
2) Cross check whether you actually wanted to do an element wise multiplication instead of a matrix multiplication. Here is a reference to a MATLAB Answer with the exact error message which might be helpful:
Hope it helps!