Академический Документы
Профессиональный Документы
Культура Документы
03411740000020
GEODINAMIKA B
Script:
% Computation and visualisation of velocity, divergence of velocity and
% time derivatives of density with ‘pcolor’ and ‘quiver’
% 2D colormap
% Creating a vector of arguments for two axes
x=0:xstp:xsize;
y=0:ystp:ysize;
figure(1);
% Plotting Vx velocity
subplot(2,3,1); % defining 1st plotting area in the 3x2 figure
pcolor(x/1000,y/1000,vx); % making a colormap
box on; % making a box around the plot
title('Vx colormap, m/s'); % title for the plot
xlabel('x, km'); % title for the horizontal axis
ylabel('y, km'); % title for the vertical axis
shading interp; % making smooth transitions between colors
colorbar; % showing a colorbar for the map
axis ij image ; % directing vertical axis downward, making proper
dimensions
% Plotting Vy velocity
subplot(2,3,2); % defining 2nd plotting area in the 3x2 figure
pcolor(x/1000,y/1000,vy); % making a colormap
box on; % making a box around the plot
title('Vy colormap, m/s'); % title for the plot
xlabel('x, km'); % title for the horizontal axis
ylabel('y, km'); % title for the vertical axis
ADIKA BAGASKARA
03411740000020
GEODINAMIKA B
shading interp; % making smooth transitions between colors
colorbar; % showing a colorbar for the map
axis ij image ; % directing vertical axis downward, making proper
dimensions
% Plotting dVx/dx
subplot(2,3,4); % defining 4th plotting area in the 3x2 figure
pcolor(x/1000,y/1000,dvxdx); % making a colormap
box on; % making a box around the plot
title('dVx/dx colormap, 1/s'); % title for the plot
xlabel('x, km'); % title for the horizontal axis
ylabel('y, km'); % title for the vertical axis
shading interp; % making smooth transitions between colors
colorbar; % showing a colorbar for the map
axis ij image ; % directing vertical axis downward, making proper
dimensions
% Plotting dVy/dy
subplot(2,3,5); % defining 5th plotting area in the 3x2 figure
pcolor(x/1000,y/1000,dvydy); % making a colormap
box on; % making box around the plot
title('dVy/dy colormap, 1/s'); % title for the plot
xlabel('x, km'); % title for the horizontal axis
ylabel('y, km'); % title for the vertical axis
shading interp; % making smooth transitions between colors
colorbar; % showing a colorbar for the map
axis ij image ; % directing vertical axis downward, making proper
dimensions
% Plotting div(v)
subplot(2,3,6); % defining 6th plotting area in the 3x2 figure
pcolor(x/1000,y/1000,divv); % making a colormap
box on; % making a box around the plot
title('div(v) colormap, 1/s'); % title for the plot
xlabel('x, km'); % title for the horizontal axis
ylabel('y, km'); % title for the vertical axis
shading interp; % making smooth transitions between colors
colorbar; % showing acolorbar for the map
axis ij image ; % directing vertical axis downward, making proper
dimensions
ADIKA BAGASKARA
03411740000020
GEODINAMIKA B
Output Gambar: