MATLAB Answers

binning data and evaluating

3 ビュー (過去 30 日間)
shobhit mehrotra
shobhit mehrotra 2015 年 3 月 1 日
回答済み: Greig 2015 年 3 月 1 日
I have a scatter plot of Y and X, I want to create a bin with the data between the point with the lowest y-value to the (lowest y-value +50) From the plot I want to bin the data from y=147 to y =197. Lastly I want the mean X and Y values for the bin.
  2 件のコメント
shobhit mehrotra
shobhit mehrotra 2015 年 3 月 1 日
the data is available in variables, this is the just plot of the data

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

採用された回答

Greig
Greig 2015 年 3 月 1 日
It this what you are looking for?
lim = [min(y), min(y) + 50]
ybin = y(y>= lim(1) & y<=lim(2))
xbin = x(y>= lim(1) & y<=lim(2))
ybar = mean(ybin);
xbar = mean(xbin);

その他の回答 (0 件)

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by