% zadani vstupnich funkci a parametru
f=@(x,t) zeros(size(x));
T=10;
du0=@(x)zeros(size(x)); % nulova pocatedni rychlost
u0=@(x)zeros(size(x));  % nulove pocatecni vychyleni
g0=@(t)sin(pi*t)*(t<=1);   % okrajove podminky - jeden kmit
g1=@(t)sin(pi*t)*(t<=1);
h=0.05;                 % krok ve smeru x
tau=0.05                % casovy krok
sigma=1;                % implicitni schema
[x,t,U] = solveWaveEq(f,T,u0,du0,g0,g1,h,tau,sigma);
plot(x,U(1,:))
axis([0,1,-2,2])
pause
for k=1:length(U), plot(x,U(k,:)),axis([0,1,-2,2]), pause(0.2);end
