Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Alice
Posts:
4
Registered:
5/9/13


Re: Masking tool/ blanking cell for bathymetry
Posted:
May 9, 2013 10:28 AM


Hi Yvonne,
I have the same problem, I have some bathymetry data with wet points which need masking out.
I have masked out the land fine with:
Dep(Dep>=0)= NaN;
Can you describe your method for masking out wet points please?
Alice
"Yvonne" wrote in message <gtqnf2$qa6$1@fred.mathworks.com>... > Thank you for your help. I have some boundary areas that i need to mask other than the land area as some parts of the area doesnt look right. I had to interpolate and grid the data and after that choose the area that is needed and from there choose the boundary. I did that by: > > %%%%%%%%%%%%%%%% > maskArea = Gridarea; > for i = 1:length(GridY) > if isnan(InterpX(i))  isnan(InterpX2(i)) > maskArea(i,:) = NaN; > else > ii=find(gridX< InterpX(i) gridX> InterpX2(i));% > maskArea(i,ii) = NaN; > end > end > %%%%%%%%%%%%%%%%% > whick work in some sense. > > thank you > Rune Allnor <allnor@tele.ntnu.no> wrote in message <b8d290c8195d4951a1e9f004eb3d78a2@v17g2000vbb.googlegroups.com>... > > On 3 Mai, 13:04, "Yvonne " <h...@waikato.ac.nz> wrote: > > > Hi, > > > > > > I am trying to write a code to mask all the land value for my bathymetry = > > grid. The land points were manually digitised. Is there any suggestions on = > > how to create a mask or a blanking cell for the land boundaries and the are= > > a that I do not want in my grid? > > > > Try to set all the zvalues of the land data points to NaN: > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > xv=randn(10000,1); > > yv=randn(10000,1); > > zv= exp((xv.^2+yv.^2))0.9; > > > > tÞlaunay(xv,yv); > > trimesh(t,xv,yv,zv) % Plots all data points > > figure > > > > Zv=zv; > > Zv(Zv>0)=nan; > > trimesh(t,xv,yv,Zv) % Leaves out points with zvalues > 0. > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > Rune



