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
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
 wormer

Click to edit the document details