Changeset 20797
- Timestamp:
- 06/23/16 08:42:52 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/examples/Pig/PigRegion.m
r20795 r20797 8 8 xmin = ncreadatt(nsidc_vel,'/','xmin'); 9 9 ymax = ncreadatt(nsidc_vel,'/','ymax'); 10 spacing = ncreadatt(nsidc_vel,'/','spacing'); ls10 spacing = ncreadatt(nsidc_vel,'/','spacing'); 11 11 12 nx 13 ny 14 vx 15 vy 12 nx = double(ncreadatt(nsidc_vel,'/','nx')); 13 ny = double(ncreadatt(nsidc_vel,'/','ny')); 14 vx = double(ncread(nsidc_vel,'vx')); 15 vy = double(ncread(nsidc_vel,'vy')); 16 16 17 17 xmin = strtrim(xmin); % this is a string, and we need to recover the double value … … 29 29 30 30 %Limit the region to Pine Island 31 posx =find(x<=-12.0e5 & x>=-18.0e5);32 x_pig =x(posx);33 posy =find(y<=1.0e5 & y>-4.0e5);34 y_pig =flipud(y(posy));31 posx = find(x<=-12.0e5 & x>=-18.0e5); 32 x_pig = x(posx); 33 posy = find(y<=1.0e5 & y>-4.0e5); 34 y_pig = flipud(y(posy)); 35 35 36 vx_pig =flipud(vx(posx,posy)');37 vy_pig =flipud(vy(posx,posy)');38 vel_pig =sqrt(vx_pig.^2+vy_pig.^2);36 vx_pig = flipud(vx(posx,posy)'); 37 vy_pig = flipud(vy(posx,posy)'); 38 vel_pig = sqrt(vx_pig.^2+vy_pig.^2); 39 39 40 imagesc(x_pig,y_pig,log(vel_pig+1)) 41 axis xy equal 40 imagesc(x_pig,y_pig,log(vel_pig+1)); 41 axis xy equal tight;
Note:
See TracChangeset
for help on using the changeset viewer.