Skip to content

Commit

Permalink
vprofile make also detail pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Mandel committed Jul 31, 2011
1 parent db9429d commit 9fdf477
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions other/Matlab/vis3d/vprofile.m
Expand Up @@ -65,9 +65,15 @@ function vprofile(p,x1,x2,tstep)
fprintf('%3i %7.3f %7.3f %7.3f %7.3f %7.3f\n',i,altitude(i),u(i),v(i),speed(i),direction(i))
end


mm=[layers,size(p.u,3)];
for i=1:2
m=mm(i);
speedfile=sprintf('speed_%i.png',m);
directionfile=sprintf('direction_%i.png',m);
windufile=sprintf('windu_%i.png',m);
windvfile=sprintf('windv_%i.png',m);
figure(1)
plot(speed,altitude)
plot(speed(1:m),altitude(1:m))
if fwh>0,
hold on
plot(sf,fwh,'*')
Expand All @@ -76,9 +82,9 @@ function vprofile(p,x1,x2,tstep)
xlabel('speed m/s')
ylabel('altitude m')
title('Wind speed');
print('-dpng','speed.png')
print('-dpng',speedfile)
figure(2)
plot(direction,altitude)
plot(direction(1:m),altitude(1:m))
if fwh>0,
hold on
plot(df,fwh,'*')
Expand All @@ -87,9 +93,9 @@ function vprofile(p,x1,x2,tstep)
xlabel('direction degrees')
ylabel('altitude m')
title('Wind direction');
print('-dpng','direction.png')
print('-dpng',directionfile)
figure(3)
plot(u,altitude)
plot(u(1:m),altitude(1:m))
if fwh>0,
hold on
plot(uf,fwh,'*')
Expand All @@ -98,9 +104,9 @@ function vprofile(p,x1,x2,tstep)
xlabel('speed m/s')
ylabel('alitude m')
title('Wind U');
print('-dpng','windu.png')
print('-dpng',windufile)
figure(4)
plot(v,altitude)
plot(v(1:m),altitude(1:m))
if fwh>0,
hold on
plot(vf,fwh,'*')
Expand All @@ -109,7 +115,8 @@ function vprofile(p,x1,x2,tstep)
xlabel('speed m/s')
ylabel('altitude m')
title('Wind V');
print('-dpng','windv.png')
print('-dpng',windvfile)
end

disp('PNG files with figures created')

Expand Down

0 comments on commit 9fdf477

Please sign in to comment.