Can you help me please?

I need to solve wave equation using Matlab. How to solve this PDE by Matlab?

$u_{tt}=c^{2}u_{xx} $ for $0<x<l$

B.C: $u_x(0,t)=0$; $u(l,t)=0$

I.C: $u(x,0)=f(x); u_t(x,0)=-cf'(x)$


  • $\begingroup$ MATLAB has not any software so that it can solve PDE. So we can only solve any PDE manually. $\endgroup$ – doraemonpaul Jul 25 '12 at 9:33

MATLAB could NOT solve this kind of PDEs analytically, but MATLAB could solve them numerically.

You need to formulate a numerical scheme to solve this equation in MATLAB numerically, either finite difference method, or finite element(same with FDM in 1D), is OK. There are lots of MATLAB scripts for solving 1D wave equation already out there on the internet, for example, this.

Also, MATLAB has a PDE tool box that could handle wave equation, you could launch the GUI of PDE tool box from the start menu of MATLAB, for a step-by-step instruction please see the link above.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.