From: Kayanja Andy on
New in matlab, Need help please in making a matlab program to solve the wave equation below up to the point when you obtain a system of equations.
solve the wave equation below up to the system of equation using Finite difference method
utt = c^2 uxx, ut(x,0) = 3sin((pi x)/9) , u(x,0) = 0, U(0,t) = U(4,t) = 0,
hx = 1, ht = 0.5, c = 2, nx = 4, nt = 2
nx, hx are number and size of x panels
nt, ht are number and size of t panels

I am using the Finite difference scheme below
u(i,j+1) = c^2*(ht/hx)^2 *(u(i+1,j) + u(i-1,j)) - u(i,j-1) + 2*(1 - c^2*(ht/hx)^2 )*u(i,j)
From: Steven Lord on

"Kayanja Andy" <kayanja.andrew(a)yahoo.com> wrote in message
news:ht5dap$jrs$1(a)fred.mathworks.com...
> New in matlab, Need help please in making a matlab program to solve the
> wave equation below up to the point when you obtain a system of equations.
> solve the wave equation below up to the system of equation using Finite
> difference method
> utt = c^2 uxx, ut(x,0) = 3sin((pi x)/9) , u(x,0) = 0, U(0,t) = U(4,t) = 0,
> hx = 1, ht = 0.5, c = 2, nx = 4, nt = 2
> nx, hx are number and size of x panels
> nt, ht are number and size of t panels
>
> I am using the Finite difference scheme below
> u(i,j+1) = c^2*(ht/hx)^2 *(u(i+1,j) + u(i-1,j)) - u(i,j-1) + 2*(1 -
> c^2*(ht/hx)^2 )*u(i,j)
>

Why don't you show the group what you've tried already and tell us
specifically where you're stuck?

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com