This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: dt = .001; % Defining an appropriate time step. u0 = zeros(1,N); %Defining the initial data u0(N/2+1:N)= ones(1,N/2); % Defining the initial data k=(1i*[0:N/21 0 N/2+1:1]); k3=k.^3; u=ifft(exp(k3*t).*fft(u0));%Solution to the Linearly dispersive wave equation. plot(u)%Command to plot the solution At time t = . 05 * , using the above code we get the following gure: 1 Using the exact solution, we get: At an irrational multiple of , we notice a fractal pattern to the graph: and the exact solution produces the same plot 2...
View Full
Document
 Spring '08
 wormer

Click to edit the document details