I have to solve a differential equation in MATLAB in (x,y) involving partial derivatives. My solution is a function of (x,y). I want to use fft differentiation( spectral method) to solve my partial derivatives.But i am stuck. I am using the following algorithm(adsbygoogle = window.adsbygoogle || []).push({});

% fderiv = ifft((i*k).^p .* fft(f)); % pth derivative of f(matrix containing functional values).

But when i try this for size(f)=2 ..it is not showing me the correct result.

my x is symmetric (-L,L)

1. does this method work with periodic f only or non periodic functions can be differentiated as well? If yes..how?

2. How to choose k in above program?

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fft in matlab

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads for matlab | Date |
---|---|

MATLAB MATLAB: forces acting on an object | Apr 6, 2018 |

MATLAB Matlab histogram | Apr 4, 2018 |

MATLAB Sovling Bernoulli's differential equation in matlab? | Apr 3, 2018 |

MATLAB Matlab-like software | Mar 27, 2018 |

MATLAB Matlab data into bins | Mar 27, 2018 |

**Physics Forums - The Fusion of Science and Community**