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/2-1 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
This note was uploaded on 11/19/2011 for the course MATH 101 taught by Professor Wormer during the Spring '08 term at UCSD.
- Spring '08