Changeset 12375
- Timestamp:
- 06/06/12 14:18:43 (13 years ago)
- Location:
- issm/trunk-jpl/src/m/model
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/model/ProfileValues.m
r12374 r12375 15 15 16 16 %Some useful parameters 17 layers=ceil(mean(md.geometry.thickness)/res _v);18 Z= bed:resolution:surface;17 layers=ceil(mean(md.geometry.thickness)/resolution); 18 Z=(bed:resolution:surface)'; 19 19 X=xprof*ones(size(Z)); 20 20 Y=yprof*ones(size(Z)); -
issm/trunk-jpl/src/m/model/plot/plot_profile.m
r12374 r12375 9 9 %process model 10 10 [x_m y_m z_m elements_m is2d isplanet]=processmesh(md,[],options); 11 if ~is2d, error('only 3d model supported'); end11 if is2d, error('only 3d model supported'); end 12 12 13 13 %Get number of curves and generate random colors … … 16 16 color=eval([ colorm '(numcurves);']); 17 17 options=removefield(options,'colormap',0); %back to default colormap 18 19 %Get coordinates 20 location=getfieldvalue(options,'profile'); 21 if ~isnumeric(location) | numel(location)~=2, 22 error('location provided not supported (should be [x y])'); 23 end 24 xprof=location(1); 25 yprof=location(2); 18 26 19 27 %Loop over number of curves … … 32 40 33 41 %Compute profile value 34 [z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution) 42 [z,data_interp]=ProfileValues(md,data,xprof,yprof,resolution); 35 43 36 44 %plot profile 37 45 subplot(nlines,ncols,i) 38 A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); 39 plot(data_interp,z,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1)); 46 plot(data_interp,z,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1),'LineStyle','-'); 40 47 hold on; 41 48 end … … 45 52 options=addfielddefault(options,'colorbar',0); 46 53 options=addfielddefault(options,'ylabel','z'); 54 options=addfielddefault(options,'view',2); 47 55 applyoptions(md,[],options);
Note:
See TracChangeset
for help on using the changeset viewer.