Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)$


share|cite|improve this question
MATLAB has not any software so that it can solve PDE. So we can only solve any PDE manually. – doraemonpaul Jul 25 '12 at 9:33
up vote 2 down vote accepted

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.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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