Operations on a sliding 2D window

Dear all,
my question concerns how can I apply some functions to study a subset of data given a dataset of spatial data (X,Y,Z).
Given a fixed window of size (length_X, length_Y), I would move it along X and Y directions. At every step I would compute the depth within which the 90% (p=0.9) of the data fall
P90 = prctile(A(:,3),p);
and store the result in a matrix.
Any suggestion how to performe this loop and store the results is welcome.

3 件のコメント

Pullak Barik
Pullak Barik 2019 年 6 月 25 日
I would like to know how exactly does your window move?
Like does it increment in both x and y directions, or alternates between sliding in x and then sliding in y, etc.
Pullak Barik
Pullak Barik 2019 年 6 月 25 日
Also, I would like to know the format of the spatial data.
That is, how is the data inside matrix A structured and arranged?
gianluca
gianluca 2019 年 6 月 25 日
編集済み: gianluca 2019 年 6 月 25 日
Dear Pullak,
the window slides first along X with Y fixed, then moves up with one step along Y and starts to slide along X and so on. The increment could be e.g. half of the window's length size so that the windows overlap each other (the window has the same size in X and Y directions).
Being A the whole dataset of random points with X,Y (spatial coordinates, i.e. latitude and longitude) and associated attribute Z (i.e. depth), I would find the points falling in the window, e.g. the subset B(x,y,z), and evaluate the depth within which the 90% of the data fall.
B = sortrows(B,3);
P90 = prctile(B(:,3),0.9);
Thanks for any help

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

製品

リリース

R2018a

質問済み:

2019 年 6 月 21 日

編集済み:

2019 年 6 月 25 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by