Realize Partial Pifferention of Convolution in Maltab
1 view (last 30 days)
Show older comments
Hi everyone,
I'm working on biomedical modeling currently. In the model, I adopted convolution of two functions, i.e. h(x,y) = f(x,y)*g(x,y), where f(x,y) is a stochastic function and g(x,y) is simply x^2+y^2, x,y>0, otherwise, f=0, g=0. Then, I need to calculate dh/dx and dh/dy for next-step modeling.
I have difficulties in doing convolution and partial differentiation when realizing the model in matlab. It seems there are two ways to accomplish the task:
1. use symbolic calculation to get symbolic results and then imply values of the variables to get final result. But the problem is: i). f and g are both discontinuous, so there may be no explicit expression for the integration; ii). I don't know how to express symbolic convolution in matlab;
2. Use numerical calculation, imply vector values to x, and y, then I can get matrix f and g, and then do numerical convolution. The problem is: I don't know how to determine the axis of convolution (since n-vector convolve m-vector yield n+m-1 vector) and how to get accurate dh/dx, dh/dy. I have tried diff(h)./diff(x), but it's time-consuming and the result seems wrong.
I've searched online for many days but without any satisfactory solution. So I'm here looking for help. Any suggestions and comments are welcomed. Thanks a lot.
Q.L
0 Comments
Answers (0)
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!