Matlab Export Interpolates Into Masked Region

147 views
Skip to first unread message

Christopher Masafu

unread,
Mar 6, 2021, 3:55:18 AM3/6/21
to PIVlab
Dear Dr William,

Thanks for this excellent program, truly helpful. 

I have a problem that I would apreciate any advice on. I am tryint to plot my velocity magnitude vectors in GIS. So I wrote a short script that allows me to post-process my results in Matlab, then export to an ascii file that I use in GIS.
However, from Mtalab, it seems my vecloity magnitude surface is interpolated even outside of my masked area. Any help with how to effectively blank this area outside my ROI?
Thanks. 

Chris 
34.JPG

William Thielicke

unread,
Mar 6, 2021, 7:01:02 AM3/6/21
to PIVlab
Hi Chris, yes that is done on purpose. You can use the typevector variable to remove data that are masked or interpolated.

Christopher Masafu

unread,
Mar 7, 2021, 2:25:25 PM3/7/21
to PIVlab
Thank you so much Dr William, this has given me many sleepless nights. 

Please, kindly, do you mind letting me know how I can use this 'typevector' variable to remove data that are masked please?

Thank you. 

Kind regards,
Chris 

Christopher Masafu

unread,
Mar 9, 2021, 2:46:10 AM3/9/21
to PIVlab
Hi William.

There are two 'typevectors', filtered and original - really grateful if you could just tell us the difference between the two and which to remove from my interpolated surface. 

Thanks very much. 

Chris 

On Saturday, March 6, 2021 at 12:01:02 PM UTC tras...@gmx.com wrote:

William Thielicke

unread,
Mar 9, 2021, 7:36:46 AM3/9/21
to PIVlab
Typevector is 0 for masked vector, 1 for regular vector, 2 for filtered vector
So you could do something like Velocity(typevector==0) = NaN

typevector_original is directly after the analysis
typevector_filtered is after you applied vector validation, so this is the one you should use.

Christopher Masafu

unread,
Mar 9, 2021, 8:40:05 AM3/9/21
to PIVlab
Thank you very much William, extremely helpful. 

Thanks. 

Chris 

Reply all
Reply to author
Forward
0 new messages